From 9b64b0139cf4e768ed70dd0b9bb11078efc8d664 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 5 Dec 2021 11:37:03 -0500 Subject: [PATCH] Check if dynamic colors are available using official API --- .../tachiyomi/ui/setting/SettingsAppearanceController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt index 2b5ea060c..1c02ca141 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAppearanceController.kt @@ -5,6 +5,7 @@ import android.os.Bundle import android.view.View import androidx.core.app.ActivityCompat import androidx.preference.PreferenceScreen +import com.google.android.material.color.DynamicColors import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.preference.asImmediateFlow import eu.kanade.tachiyomi.util.preference.defaultValue @@ -69,7 +70,7 @@ class SettingsAppearanceController : SettingsController() { val appThemes = Values.AppTheme.values().filter { val monetFilter = if (it == Values.AppTheme.MONET) { - Build.VERSION.SDK_INT >= Build.VERSION_CODES.S + DynamicColors.isDynamicColorAvailable() } else { true }