Remove SuppressLint in ThemePreference

This commit is contained in:
Jays2Kings 2021-07-19 00:29:48 -04:00
parent c5a335b88f
commit 45b04e9edb

View File

@ -212,7 +212,6 @@ class ThemePreference @JvmOverloads constructor(context: Context, attrs: Attribu
val binding = ThemeItemBinding.bind(view) val binding = ThemeItemBinding.bind(view)
@SuppressLint("InlinedApi")
override fun bindView(item: ThemeItem, payloads: List<Any>) { override fun bindView(item: ThemeItem, payloads: List<Any>) {
binding.themeNameText.setText( binding.themeNameText.setText(
if (item.isDarkTheme) { if (item.isDarkTheme) {
@ -234,7 +233,8 @@ class ThemePreference @JvmOverloads constructor(context: Context, attrs: Attribu
binding.themeSelected.alpha = if (themeMatchesApp) 1f else 0.5f binding.themeSelected.alpha = if (themeMatchesApp) 1f else 0.5f
binding.checkbox.alpha = if (themeMatchesApp) 1f else 0.5f binding.checkbox.alpha = if (themeMatchesApp) 1f else 0.5f
} }
if (item.theme.styleRes == R.style.Theme_Tachiyomi_Monet) { if (item.theme.styleRes == R.style.Theme_Tachiyomi_Monet &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
val nightMode = item.isDarkTheme val nightMode = item.isDarkTheme
val appBar = context.contextCompatColor( val appBar = context.contextCompatColor(
if (nightMode) android.R.color.system_neutral1_900 if (nightMode) android.R.color.system_neutral1_900