fixed notification being overwritten

This commit is contained in:
Mike Schwörer 2018-11-17 17:06:34 +01:00
parent 92135e64a3
commit 6f7585323b
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
1 changed files with 4 additions and 1 deletions

View File

@ -171,6 +171,9 @@ public class NotificationService
mBuilder.setShowWhen(true);
mBuilder.setWhen(msg.Timestamp * 1000);
mBuilder.setAutoCancel(true);
mBuilder.setCategory(Notification.CATEGORY_MESSAGE);
mBuilder.setStyle(new NotificationCompat.InboxStyle());
mBuilder.setGroup(prio.toString());
if (msg.Priority == PriorityEnum.LOW) mBuilder.setPriority(NotificationCompat.PRIORITY_LOW);
if (msg.Priority == PriorityEnum.NORMAL) mBuilder.setPriority(NotificationCompat.PRIORITY_DEFAULT);
@ -198,7 +201,7 @@ public class NotificationService
Notification n = mBuilder.build();
if (mNotificationManager != null) mNotificationManager.notify(0, n);
if (mNotificationManager != null) mNotificationManager.notify((int)msg.SCN_ID, n);
}
@RequiresApi(api = Build.VERSION_CODES.O)