mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-03 13:20:31 +00:00
avoid problems with hacky way of saving AllColors theme name
see GH-1528
This commit is contained in:
parent
366ee5ae28
commit
a3dff524cb
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue