Skip to content

Commit c8b4685

Browse files
committed
Fix ErrorActivity colors
1 parent 561d567 commit c8b4685

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ private static void reportErrorInSnackbar(final Context context,
137137
protected void onCreate(final Bundle savedInstanceState) {
138138
assureCorrectAppLanguage(this);
139139
super.onCreate(savedInstanceState);
140+
141+
ThemeHelper.setDayNightMode(this);
140142
ThemeHelper.setTheme(this);
141143

142144
activityErrorBinding = ActivityErrorBinding.inflate(getLayoutInflater());

app/src/main/java/org/schabi/newpipe/util/ThemeHelper.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ private ThemeHelper() {
4747
* Apply the selected theme (on NewPipe settings) in the context
4848
* with the default style (see {@link #setTheme(Context, int)}).
4949
*
50+
* ThemeHelper.setDayNightMode should be called before
51+
* the applying theme for the first time in session
52+
*
5053
* @param context context that the theme will be applied
5154
*/
5255
public static void setTheme(final Context context) {
@@ -57,6 +60,9 @@ public static void setTheme(final Context context) {
5760
* Apply the selected theme (on NewPipe settings) in the context,
5861
* themed according with the styles defined for the service .
5962
*
63+
* ThemeHelper.setDayNightMode should be called before
64+
* the applying theme for the first time in session
65+
*
6066
* @param context context that the theme will be applied
6167
* @param serviceId the theme will be styled to the service with this id,
6268
* pass -1 to get the default style

0 commit comments

Comments
 (0)