mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 10:51:52 +01:00
Fixed fresh installs on A12 not using Monet theme by default
This commit is contained in:
parent
c3fd4349fe
commit
72ffc9abd0
@ -116,7 +116,7 @@ class PreferencesHelper(val context: Context) {
|
|||||||
|
|
||||||
fun clear() = prefs.edit().clear().apply()
|
fun clear() = prefs.edit().clear().apply()
|
||||||
|
|
||||||
fun oldTheme() = prefs.getInt(Keys.theme, 5)
|
fun oldTheme() = flowPrefs.getInt(Keys.theme, 5)
|
||||||
|
|
||||||
fun nightMode() = flowPrefs.getInt(Keys.nightMode, AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
fun nightMode() = flowPrefs.getInt(Keys.nightMode, AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM)
|
||||||
|
|
||||||
|
@ -87,8 +87,9 @@ object ThemeUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun AppCompatActivity.setThemeAndNight(preferences: PreferencesHelper) {
|
fun AppCompatActivity.setThemeAndNight(preferences: PreferencesHelper) {
|
||||||
if (preferences.nightMode().isNotSet()) {
|
if (preferences.nightMode().isNotSet() && preferences.oldTheme().isSet()) {
|
||||||
ThemeUtil.convertTheme(preferences, preferences.oldTheme())
|
ThemeUtil.convertTheme(preferences, preferences.oldTheme().get())
|
||||||
|
preferences.oldTheme().delete()
|
||||||
}
|
}
|
||||||
if (AppCompatDelegate.getDefaultNightMode() != preferences.nightMode().get()) {
|
if (AppCompatDelegate.getDefaultNightMode() != preferences.nightMode().get()) {
|
||||||
AppCompatDelegate.setDefaultNightMode(preferences.nightMode().get())
|
AppCompatDelegate.setDefaultNightMode(preferences.nightMode().get())
|
||||||
|
Loading…
Reference in New Issue
Block a user