From 25c237f0a8e9c036436ec1d9977e24fd19498bd3 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 23 Dec 2023 17:01:26 +0100 Subject: [PATCH] Fix theme issues --- .../fedilab/android/mastodon/helper/ThemeHelper.java | 4 +++- app/src/main/res/values-night/themes.xml | 12 ++++++++++++ app/src/main/res/values/themes.xml | 6 ++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java b/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java index db4c32fd..51d1b8d0 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java +++ b/app/src/main/java/app/fedilab/android/mastodon/helper/ThemeHelper.java @@ -275,7 +275,7 @@ public class ThemeHelper { public static void switchTo(String themePref) { if (themes.LIGHT.name().equals(themePref) || themes.SOLARIZED_LIGHT.name().equals(themePref)) { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); - } else if (themes.DARK.name().equals(themePref) || themes.SOLARIZED_DARK.name().equals(themePref)) { + } else if (themes.DARK.name().equals(themePref) || themes.SOLARIZED_DARK.name().equals(themePref) || themes.DRACULA.name().equals(themePref) || themes.BLACK.name().equals(themePref)) { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { @@ -314,6 +314,8 @@ public class ThemeHelper { public enum themes { LIGHT, DARK, + BLACK, + DRACULA, SYSTEM, SOLARIZED_LIGHT, SOLARIZED_DARK diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml index a77b7b9a..8344bd2c 100644 --- a/app/src/main/res/values-night/themes.xml +++ b/app/src/main/res/values-night/themes.xml @@ -45,6 +45,7 @@ @transition/change_image_transform + @style/AppThemeAlertDialog @@ -98,6 +100,7 @@ true true + @style/AppThemeAlertDialog @@ -434,6 +444,7 @@ @color/dracula_comment @color/dracula_foreground @color/dracula_comment + @style/DraculaAlertDialog