mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Show same color for summary notification
This commit is contained in:
parent
dd30c387fc
commit
dc1dfcb8d2
1 changed files with 20 additions and 13 deletions
|
@ -4275,22 +4275,29 @@ class Core {
|
|||
builder.setSound(null);
|
||||
}
|
||||
|
||||
if (group != 0 && messages.size() > 0) {
|
||||
TupleMessageEx amessage = messages.get(0);
|
||||
Integer color = getColor(amessage);
|
||||
if (pro && color != null) {
|
||||
if (pro) {
|
||||
Integer color = null;
|
||||
for (TupleMessageEx message : messages) {
|
||||
Integer mcolor = getColor(message);
|
||||
if (mcolor == null) {
|
||||
color = null;
|
||||
break;
|
||||
} else if (color == null)
|
||||
color = mcolor;
|
||||
else if (!color.equals(mcolor)) {
|
||||
color = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (color != null) {
|
||||
builder.setColor(color);
|
||||
builder.setColorized(true);
|
||||
}
|
||||
|
||||
// Disabled to show number of new messages
|
||||
if (notify_subtext && false)
|
||||
if (group < 0) // folder
|
||||
builder.setSubText(amessage.accountName + " - " + amessage.getFolderName(context));
|
||||
else if (group > 0) // account
|
||||
builder.setSubText(amessage.accountName);
|
||||
}
|
||||
|
||||
// Subtext should not be set, to show number of new messages
|
||||
|
||||
Notification pub = builder.build();
|
||||
builder
|
||||
.setVisibility(NotificationCompat.VISIBILITY_PRIVATE)
|
||||
|
@ -4716,8 +4723,8 @@ class Core {
|
|||
mbuilder.addPerson(you.build());
|
||||
}
|
||||
|
||||
Integer color = getColor(message);
|
||||
if (pro && color != null) {
|
||||
if (pro) {
|
||||
Integer color = getColor(message);
|
||||
mbuilder.setColor(color);
|
||||
mbuilder.setColorized(true);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue