From 9d864857dac4e653ad25180c4f2dc1694286a2ca Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 23 Nov 2022 15:57:06 +0100 Subject: [PATCH] Fix issue #490 - Remove grouped notifications for Android 5 & 6 --- app/src/main/java/app/fedilab/android/helper/Helper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java index df3b8c9fa..aa73e0441 100644 --- a/app/src/main/java/app/fedilab/android/helper/Helper.java +++ b/app/src/main/java/app/fedilab/android/helper/Helper.java @@ -1610,8 +1610,11 @@ public class Helper { .setGroup(account.mastodon_account != null ? account.mastodon_account.username + "@" + account.instance : "" + "@" + account.instance) .setGroupSummary(true) .build(); + notificationManager.notify(notificationId++, notificationBuilder.build()); - notificationManager.notify(0, summaryNotification); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) { + notificationManager.notify(0, summaryNotification); + } } public static void transfertIfExist(Context context) {