Refactor: Change UncivGame.worldScreen and UncivGame.gameInfo to be of nullable type (#7114)

* Refactor: Make Popups work on Stages instead of BaseScreens

* Refactor: Change UncivGame.worldScreen and UncivGame.gameInfo to be of nullable type

* Fix "Resume" game loading not fully handling exceptions

* Fix one missed refactoring

* Refactor: remove useless postRunnable
This commit is contained in:
Timo T
2022-06-11 21:14:44 +02:00
committed by GitHub
parent 72b197fdc3
commit 9008d242a3
75 changed files with 427 additions and 346 deletions

View File

@ -70,13 +70,13 @@ open class AndroidLauncher : AndroidApplication() {
override fun onPause() {
if (UncivGame.isCurrentInitialized()
&& UncivGame.Current.isGameInfoInitialized()
&& UncivGame.Current.gameInfo != null
&& UncivGame.Current.settings.multiplayer.turnCheckerEnabled
&& UncivGame.Current.gameSaver.getMultiplayerSaves().any()
) {
MultiplayerTurnCheckWorker.startTurnChecker(
applicationContext, UncivGame.Current.gameSaver,
UncivGame.Current.gameInfo, UncivGame.Current.settings.multiplayer
UncivGame.Current.gameInfo!!, UncivGame.Current.settings.multiplayer
)
}
super.onPause()