1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-02 13:14:39 +00:00

Wearable improvement

This commit is contained in:
M66B 2019-10-21 16:30:42 +02:00
parent 835f2670fa
commit f0060fa8bb

View file

@ -2726,8 +2726,13 @@ class Core {
for (NotificationCompat.Builder builder : notifications) {
long id = builder.getExtras().getLong("id", 0);
if ((id == 0 && add.size() + remove.size() > 0) || add.contains(id)) {
if (wearable_preview ? id < 0 : update.contains(id))
builder.setLocalOnly(true);
if (id == 0) {
if (!notify_summary)
builder.setLocalOnly(true);
} else {
if (wearable_preview ? id < 0 : update.contains(id))
builder.setLocalOnly(true);
}
String tag = "unseen." + group + "." + Math.abs(id);
Notification notification = builder.build();
@ -2851,9 +2856,10 @@ class Core {
sb.append("<br>");
}
// Wearable should ignore summary notification
// Wearables
builder.setContentText(title);
// Device
builder.setStyle(new NotificationCompat.BigTextStyle()
.bigText(HtmlHelper.fromHtml(sb.toString()))
.setSummaryText(title));