avoid problems with hacky way of saving AllColors theme name

see GH-1528
This commit is contained in:
Helium314 2025-05-06 18:58:14 +02:00
parent 366ee5ae28
commit a3dff524cb

View file

@ -272,7 +272,8 @@ private fun loadColorString(colorString: String, prefs: SharedPreferences): Bool
try {
allColors[ColorType.valueOf(it.key)] = it.value
} catch (_: IllegalArgumentException) {
themeName = decodeBase36(it.key)
if (it.value == 0) // hacky way of storing theme name: put it in a key with value 0
runCatching { decodeBase36(it.key) }.getOrNull()?.let { themeName = it }
}
}
themeName = KeyboardTheme.getUnusedThemeName(themeName, prefs)