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