Skip to content

Commit 6754ce1

Browse files
Merge pull request commons-app#2110 from ShridharGoel/issue2107
Fix commons-app#2107 by changing notification text colour to white in night mode
2 parents 9c58994 + 0e3ca3e commit 6754ce1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/src/main/java/fr/free/nrw/commons/notification/NotificationRenderer.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package fr.free.nrw.commons.notification;
22

33
import android.graphics.Color;
4+
import android.preference.PreferenceManager;
45
import android.text.Html;
56
import android.text.SpannableString;
67
import android.text.Spanned;
@@ -77,7 +78,13 @@ public void onClick(View view) {
7778
public void updateDrawState(TextPaint ds) {
7879
super.updateDrawState(ds);
7980
ds.setUnderlineText(false);
80-
ds.setColor(Color.BLACK);
81+
82+
if(PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("theme", false)) {
83+
ds.setColor(Color.WHITE);
84+
}
85+
else {
86+
ds.setColor(Color.BLACK);
87+
}
8188
}
8289
};
8390

0 commit comments

Comments
 (0)