From 2dd3b112bdaa3e702187988a288ef1c5bf8bebb7 Mon Sep 17 00:00:00 2001 From: Jays2Kings Date: Mon, 19 Jul 2021 00:06:08 -0400 Subject: [PATCH] Default theme for a12 is now monet --- .../kanade/tachiyomi/data/preference/PreferencesHelper.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 5b35dedefe..1824968f05 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -3,6 +3,7 @@ package eu.kanade.tachiyomi.data.preference import android.content.Context import android.content.SharedPreferences import android.net.Uri +import android.os.Build import android.os.Environment import androidx.appcompat.app.AppCompatDelegate import androidx.core.content.edit @@ -121,8 +122,9 @@ class PreferencesHelper(val context: Context) { fun themeDarkAmoled() = flowPrefs.getBoolean(Keys.themeDarkAmoled, false) - fun lightTheme() = flowPrefs.getEnum(Keys.lightTheme, Themes.DEFAULT) - fun darkTheme() = flowPrefs.getEnum(Keys.darkTheme, Themes.DEFAULT) + val isOnA12 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S + fun lightTheme() = flowPrefs.getEnum(Keys.lightTheme, if (isOnA12) Themes.MONET else Themes.DEFAULT) + fun darkTheme() = flowPrefs.getEnum(Keys.darkTheme, if (isOnA12) Themes.MONET else Themes.DEFAULT) fun pageTransitions() = flowPrefs.getBoolean(Keys.enableTransitions, true)