Fix grouped notifications
This commit is contained in:
parent
6312a9ad5d
commit
b8442194b2
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue