Fix grouped notifications

This commit is contained in:
tom79 2019-11-01 10:22:14 +01:00
parent 6312a9ad5d
commit b8442194b2
1 changed files with 11 additions and 11 deletions

View File

@ -1303,17 +1303,17 @@ public class Helper {
notificationBuilder.setLargeIcon(icon);
notificationManager.notify(notificationId, notificationBuilder.build());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Notification summaryNotification =
new NotificationCompat.Builder(context, channelId)
.setContentTitle(account.getAcct() + "@" + account.getInstance())
.setContentText(channelTitle)
.setSmallIcon(getNotificationIcon(context))
.setGroup(account.getAcct() + "@" + account.getInstance())
.setGroupSummary(true)
.build();
notificationManager.notify(0, summaryNotification);
}
Notification summaryNotification =
new NotificationCompat.Builder(context, channelId)
.setContentTitle(title)
.setContentText(channelTitle)
.setContentIntent(pIntent)
.setLargeIcon(icon)
.setSmallIcon(getNotificationIcon(context))
.setGroup(account.getAcct() + "@" + account.getInstance())
.setGroupSummary(true)
.build();
notificationManager.notify(0, summaryNotification);
}