From 05b00bbe6b3b6570d36d1261a89c35b30db228ba Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 23 Dec 2019 00:00:57 +0100 Subject: [PATCH] add comment that setNumber() also sets the badge-count on android8 and newer --- .../notifications/MultipleRecipientNotificationBuilder.java | 2 +- .../notifications/SingleRecipientNotificationBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java b/src/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java index 605ac90b8..b3769e878 100644 --- a/src/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java +++ b/src/org/thoughtcrime/securesms/notifications/MultipleRecipientNotificationBuilder.java @@ -54,7 +54,7 @@ public class MultipleRecipientNotificationBuilder extends AbstractNotificationBu setSubText(context.getString(R.string.notify_n_messages_in_m_chats, messageCount, chatCount)); setContentInfo(String.valueOf(messageCount)); - setNumber(messageCount); + setNumber(messageCount); // this also sets badges on android8 and newer } void setMostRecentSender(Recipient recipient) { diff --git a/src/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java b/src/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java index 577ecc4ac..b06536102 100644 --- a/src/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java +++ b/src/org/thoughtcrime/securesms/notifications/SingleRecipientNotificationBuilder.java @@ -92,7 +92,7 @@ public class SingleRecipientNotificationBuilder extends AbstractNotificationBuil public void setMessageCount(int messageCount) { setContentInfo(String.valueOf(messageCount)); - setNumber(messageCount); + setNumber(messageCount); // this also sets badges on android8 and newer } public void setPrimaryMessageBody(@NonNull Recipient chatRecipients,