mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Fix double notifications in O+.
This commit is contained in:
parent
604e5d788e
commit
11d34512a0
@ -33,6 +33,7 @@ import android.os.AsyncTask;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.service.notification.StatusBarNotification;
|
import android.service.notification.StatusBarNotification;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v4.app.NotificationCompat;
|
||||||
import android.support.v4.app.NotificationManagerCompat;
|
import android.support.v4.app.NotificationManagerCompat;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import org.thoughtcrime.securesms.logging.Log;
|
import org.thoughtcrime.securesms.logging.Log;
|
||||||
@ -306,6 +307,7 @@ public class MessageNotifier {
|
|||||||
builder.setGroup(NOTIFICATION_GROUP);
|
builder.setGroup(NOTIFICATION_GROUP);
|
||||||
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
||||||
builder.setOnlyAlertOnce(!signal);
|
builder.setOnlyAlertOnce(!signal);
|
||||||
|
builder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY);
|
||||||
|
|
||||||
long timestamp = notifications.get(0).getTimestamp();
|
long timestamp = notifications.get(0).getTimestamp();
|
||||||
if (timestamp != 0) builder.setWhen(timestamp);
|
if (timestamp != 0) builder.setWhen(timestamp);
|
||||||
@ -349,6 +351,7 @@ public class MessageNotifier {
|
|||||||
builder.setGroup(NOTIFICATION_GROUP);
|
builder.setGroup(NOTIFICATION_GROUP);
|
||||||
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
builder.setDeleteIntent(notificationState.getDeleteIntent(context));
|
||||||
builder.setOnlyAlertOnce(!signal);
|
builder.setOnlyAlertOnce(!signal);
|
||||||
|
builder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_SUMMARY);
|
||||||
|
|
||||||
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…
Reference in New Issue
Block a user