mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-14 21:18:56 +01:00
Allow Samsung devices on Android 12+ to use dynamic theme
Since it seems to work fine, regardless of what the Material Components library seems to dictate.
This commit is contained in:
@@ -6,7 +6,6 @@ import android.os.Environment
|
||||
import androidx.core.content.edit
|
||||
import androidx.core.net.toUri
|
||||
import androidx.preference.PreferenceManager
|
||||
import com.google.android.material.color.DynamicColors
|
||||
import com.tfcporciuncula.flow.FlowSharedPreferences
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
@@ -73,7 +72,7 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun appTheme() = flowPrefs.getEnum(
|
||||
"pref_app_theme",
|
||||
if (DynamicColors.isDynamicColorAvailable()) { Values.AppTheme.MONET } else { Values.AppTheme.DEFAULT }
|
||||
if (DeviceUtil.isDynamicColorAvailable) { Values.AppTheme.MONET } else { Values.AppTheme.DEFAULT }
|
||||
)
|
||||
|
||||
fun themeDarkAmoled() = flowPrefs.getBoolean("pref_theme_dark_amoled_key", false)
|
||||
|
||||
Reference in New Issue
Block a user