mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-23 15:49:09 +00:00
fix user-defined theme being added to list on first startup
This commit is contained in:
parent
18693cdf20
commit
e342ff24b5
1 changed files with 10 additions and 6 deletions
|
@ -201,9 +201,11 @@ fun checkVersionUpgrade(context: Context) {
|
|||
if (colorsDay.any { it.color != null }) {
|
||||
KeyboardTheme.writeUserColors(prefs, themeNameDay, colorsDay)
|
||||
}
|
||||
if (prefs.contains("theme_color_show_more_colors")) {
|
||||
val moreColorsDay = prefs.getInt("theme_color_show_more_colors", 0)
|
||||
prefs.edit().remove("theme_color_show_more_colors").apply()
|
||||
KeyboardTheme.writeUserMoreColors(prefs, themeNameDay, moreColorsDay)
|
||||
}
|
||||
if (prefs.contains("theme_color_all_colors")) {
|
||||
val allColorsDay = readAllColorsMap(false)
|
||||
prefs.edit().remove("theme_color_all_colors").apply()
|
||||
|
@ -224,9 +226,11 @@ fun checkVersionUpgrade(context: Context) {
|
|||
if (colorsNight.any { it.color!= null }) {
|
||||
KeyboardTheme.writeUserColors(prefs, themeNameNight, colorsNight)
|
||||
}
|
||||
if (prefs.contains("theme_dark_color_show_more_colors")) {
|
||||
val moreColorsNight = prefs.getInt("theme_dark_color_show_more_colors", 0)
|
||||
prefs.edit().remove("theme_dark_color_show_more_colors").apply()
|
||||
KeyboardTheme.writeUserMoreColors(prefs, themeNameNight, moreColorsNight)
|
||||
}
|
||||
if (prefs.contains("theme_dark_color_all_colors")) {
|
||||
val allColorsNight = readAllColorsMap(false)
|
||||
prefs.edit().remove("theme_dark_color_all_colors").apply()
|
||||
|
|
Loading…
Add table
Reference in a new issue