diff --git a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt index 132689d6e..95efb625e 100644 --- a/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt +++ b/app/src/main/java/com/github/libretube/fragments/PlayerFragment.kt @@ -1607,6 +1607,7 @@ class PlayerFragment : BaseFragment() { private fun isServiceRunning(context: Context, serviceClass: Class<*>): Boolean { val manager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager + @Suppress("DEPRECATION") for (service in manager.getRunningServices(Int.MAX_VALUE)) { if (serviceClass.name == service.service.className) { return true diff --git a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt index f3e48bba4..952797a37 100644 --- a/app/src/main/java/com/github/libretube/util/ThemeHelper.kt +++ b/app/src/main/java/com/github/libretube/util/ThemeHelper.kt @@ -18,7 +18,7 @@ import com.google.android.material.color.DynamicColors object ThemeHelper { fun updateTheme(activity: AppCompatActivity) { - val themeMode = PreferenceHelper.getString(PreferenceKeys.THEME_MODE, "A")!! + val themeMode = PreferenceHelper.getString(PreferenceKeys.THEME_MODE, "A") val pureThemeEnabled = PreferenceHelper.getBoolean(PreferenceKeys.PURE_THEME, false) updateAccentColor(activity, pureThemeEnabled) @@ -37,8 +37,8 @@ object ThemeHelper { ) { "my" -> { applyDynamicColors(activity) - if (pureThemeEnabled) R.style.MaterialYou_Pure - else R.style.MaterialYou + if (pureThemeEnabled) R.style.BaseTheme_Pure + else R.style.BaseTheme } // set the theme, use the pure theme if enabled "red" -> if (pureThemeEnabled) R.style.Theme_Red_Pure else R.style.Theme_Red diff --git a/app/src/main/res/drawable/rounded_bottom_sheet.xml b/app/src/main/res/drawable/rounded_bottom_sheet.xml new file mode 100644 index 000000000..a911e59af --- /dev/null +++ b/app/src/main/res/drawable/rounded_bottom_sheet.xml @@ -0,0 +1,10 @@ + + + + + + + diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index 90b219957..4d9db8538 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -1,6 +1,6 @@ - - - - - - - - - - - - -