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() { private fun stopBackgroundMapGeneration() {
backgroundStack.clearActions()
val currentJob = backgroundMapGenerationJob val currentJob = backgroundMapGenerationJob
?: return ?: return
backgroundMapGenerationJob = null backgroundMapGenerationJob = null
if (currentJob.isCancelled) return if (currentJob.isCancelled) return
currentJob.cancel() currentJob.cancel()
backgroundStack.clearActions()
} }
private fun resumeGame() { private fun resumeGame() {