mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 23:23:39 +00:00
Fix notifications triggering too often.
This commit is contained in:
parent
b79748bbb1
commit
10a790df88
@ -305,6 +305,7 @@ public class MessageNotifier {
|
|||||||
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
|
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
|
||||||
builder.setGroup(NOTIFICATION_GROUP);
|
builder.setGroup(NOTIFICATION_GROUP);
|
||||||
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
||||||
|
builder.setOnlyAlertOnce(!signal);
|
||||||
|
|
||||||
long timestamp = notifications.get(0).getTimestamp();
|
long timestamp = notifications.get(0).getTimestamp();
|
||||||
if (timestamp != 0) builder.setWhen(timestamp);
|
if (timestamp != 0) builder.setWhen(timestamp);
|
||||||
@ -347,6 +348,7 @@ public class MessageNotifier {
|
|||||||
builder.setMostRecentSender(notifications.get(0).getIndividualRecipient());
|
builder.setMostRecentSender(notifications.get(0).getIndividualRecipient());
|
||||||
builder.setGroup(NOTIFICATION_GROUP);
|
builder.setGroup(NOTIFICATION_GROUP);
|
||||||
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
||||||
|
builder.setOnlyAlertOnce(!signal);
|
||||||
|
|
||||||
long timestamp = notifications.get(0).getTimestamp();
|
long timestamp = notifications.get(0).getTimestamp();
|
||||||
if (timestamp != 0) builder.setWhen(timestamp);
|
if (timestamp != 0) builder.setWhen(timestamp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user