mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Check if dynamic colors are available using official API
This commit is contained in:
parent
0a6160d7cf
commit
9b64b0139c
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue