Fix accent as notification color

This commit is contained in:
NekoInverter 2021-01-06 13:33:03 +08:00 committed by 世界
parent 5c610deb1b
commit 2916b510c2
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -4610,6 +4610,10 @@ public class NotificationsController extends BaseController {
if (color == 0) {
color = Theme.getColor(Theme.key_actionBarDefault) | 0xff000000;
}
// too bright
if (AndroidUtilities.computePerceivedBrightness(color) >= 0.721f) {
color = Theme.getColor(Theme.key_windowBackgroundWhiteBlueHeader) | 0xff000000;
}
return color;
}
}