From c8b4685fc985c7e61c50a78f8cef96e6ae289e88 Mon Sep 17 00:00:00 2001 From: krlvm <51774833+krlvm@users.noreply.github.com> Date: Mon, 29 Mar 2021 22:44:03 +0300 Subject: [PATCH] Fix ErrorActivity colors --- .../main/java/org/schabi/newpipe/error/ErrorActivity.java | 2 ++ app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java index c39d616e6..4efb7cf93 100644 --- a/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java +++ b/app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java @@ -137,6 +137,8 @@ public class ErrorActivity extends AppCompatActivity { protected void onCreate(final Bundle savedInstanceState) { assureCorrectAppLanguage(this); super.onCreate(savedInstanceState); + + ThemeHelper.setDayNightMode(this); ThemeHelper.setTheme(this); activityErrorBinding = ActivityErrorBinding.inflate(getLayoutInflater()); diff --git a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java index e6e274ae7..907bcf0ba 100644 --- a/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java +++ b/app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java @@ -47,6 +47,9 @@ public final class ThemeHelper { * Apply the selected theme (on NewPipe settings) in the context * with the default style (see {@link #setTheme(Context, int)}). * + * ThemeHelper.setDayNightMode should be called before + * the applying theme for the first time in session + * * @param context context that the theme will be applied */ public static void setTheme(final Context context) { @@ -57,6 +60,9 @@ public final class ThemeHelper { * Apply the selected theme (on NewPipe settings) in the context, * themed according with the styles defined for the service . * + * ThemeHelper.setDayNightMode should be called before + * the applying theme for the first time in session + * * @param context context that the theme will be applied * @param serviceId the theme will be styled to the service with this id, * pass -1 to get the default style