From 10a790df8822e0a5b45014cdea30d2755ca87ae5 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 14 Aug 2018 20:19:25 -0700 Subject: [PATCH] Fix notifications triggering too often. --- .../thoughtcrime/securesms/notifications/MessageNotifier.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index 87390b0676..a8e4df62e0 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -305,6 +305,7 @@ public class MessageNotifier { builder.setContentIntent(notifications.get(0).getPendingIntent(context)); builder.setGroup(NOTIFICATION_GROUP); builder.setDeleteIntent(notificationState.getDeleteIntent(context)); + builder.setOnlyAlertOnce(!signal); long timestamp = notifications.get(0).getTimestamp(); if (timestamp != 0) builder.setWhen(timestamp); @@ -347,6 +348,7 @@ public class MessageNotifier { builder.setMostRecentSender(notifications.get(0).getIndividualRecipient()); builder.setGroup(NOTIFICATION_GROUP); builder.setDeleteIntent(notificationState.getDeleteIntent(context)); + builder.setOnlyAlertOnce(!signal); long timestamp = notifications.get(0).getTimestamp(); if (timestamp != 0) builder.setWhen(timestamp);