From fad3e0863cd2f475e95a4f7e6d6b02000c8b4ff3 Mon Sep 17 00:00:00 2001 From: cmclark00 Date: Mon, 31 Mar 2025 17:15:58 -0400 Subject: [PATCH] Fix compilation errors with unresolved references --- app/src/main/java/com/mintris/MainActivity.kt | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/mintris/MainActivity.kt b/app/src/main/java/com/mintris/MainActivity.kt index c0a357c..0afc7bf 100644 --- a/app/src/main/java/com/mintris/MainActivity.kt +++ b/app/src/main/java/com/mintris/MainActivity.kt @@ -85,6 +85,7 @@ class MainActivity : AppCompatActivity(), private var lastRandomLevel = 0 // Track the level at which we last did a random change private var isRandomModeEnabled = false private var currentTheme = PlayerProgressionManager.THEME_CLASSIC + private val handler = Handler(Looper.getMainLooper()) // Activity result launcher for high score entry private lateinit var highScoreEntryLauncher: ActivityResultLauncher @@ -172,8 +173,13 @@ class MainActivity : AppCompatActivity(), binding.gameOverContainer.visibility = View.VISIBLE binding.gameControlsContainer.visibility = View.GONE + // Get all themes with "Theme" in their name + val themeRewards = progressionManager.getUnlockedThemes().filter { + it.contains("Theme", ignoreCase = true) + } + // Update theme selector if new themes were unlocked - if (newRewards.any { it.contains("Theme") }) { + if (themeRewards.isNotEmpty()) { updateThemeSelector() } } @@ -500,8 +506,13 @@ class MainActivity : AppCompatActivity(), binding.gameOverContainer.visibility = View.VISIBLE binding.gameControlsContainer.visibility = View.GONE + // Get all themes with "Theme" in their name + val themeRewards = progressionManager.getUnlockedThemes().filter { + it.contains("Theme", ignoreCase = true) + } + // Update theme selector if new themes were unlocked - if (newRewards.any { it.contains("Theme") }) { + if (themeRewards.isNotEmpty()) { updateThemeSelector() } }