Fix Main Menu BG map cycle not stopping on user action (#9229)

This commit is contained in:
SomeTroglodyte
2023-04-19 23:21:02 +02:00
committed by GitHub
parent e9296842b6
commit e265e9a71f

View File

@ -258,12 +258,12 @@ class MainMenuScreen: BaseScreen(), RecreateOnResize {
}
private fun stopBackgroundMapGeneration() {
backgroundStack.clearActions()
val currentJob = backgroundMapGenerationJob
?: return
backgroundMapGenerationJob = null
if (currentJob.isCancelled) return
currentJob.cancel()
backgroundStack.clearActions()
}
private fun resumeGame() {