From bea218e94edde1fb9d42825a0d72e60856c48c72 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 18 Oct 2023 07:29:54 +0200 Subject: [PATCH] Respect black background for Material You --- .../main/java/eu/faircode/email/FragmentDialogTheme.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java b/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java index ce60c7c40c..d6bc561b96 100644 --- a/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java +++ b/app/src/main/java/eu/faircode/email/FragmentDialogTheme.java @@ -626,11 +626,12 @@ public class FragmentDialogTheme extends FragmentDialogBase { boolean tabular_card_bg = prefs.getBoolean("tabular_card_bg", false); String theme = prefs.getString("theme", "blue_orange_system"); boolean dark = Helper.isDarkTheme(context); - boolean solarized = (theme != null && theme.startsWith("solarized")); - boolean you = (theme != null && theme.startsWith("you_")); + boolean black = (!"black".equals(theme) && theme.endsWith("black")); + boolean solarized = theme.startsWith("solarized"); + boolean you = theme.startsWith("you_"); if (cards) { - if (you && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) + if (you && !black && Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) view.setBackgroundColor(ContextCompat.getColor(context, dark ? android.R.color.system_background_dark : android.R.color.system_background_light));