From 28193c2f6148a01ea7b2f32582ea87acfb93ddde Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Thu, 10 Nov 2022 12:41:15 -0500 Subject: [PATCH] Allow all notifications to be cancelled when bubbles are disabled. --- .../main/java/org/thoughtcrime/securesms/util/BubbleUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/BubbleUtil.java b/app/src/main/java/org/thoughtcrime/securesms/util/BubbleUtil.java index 4e4c392547..d164cfdb95 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/BubbleUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/util/BubbleUtil.java @@ -68,7 +68,8 @@ public final class BubbleUtil { NotificationChannel conversationChannel = notificationManager.getNotificationChannel(ConversationUtil.getChannelId(context, recipient), ConversationUtil.getShortcutId(recipientId)); - return notificationManager.areBubblesAllowed() || (conversationChannel != null && conversationChannel.canBubble()); + return (Build.VERSION.SDK_INT < 31 || (notificationManager.areBubblesEnabled() && notificationManager.getBubblePreference() != NotificationManager.BUBBLE_PREFERENCE_NONE)) && + (notificationManager.areBubblesAllowed() || (conversationChannel != null && conversationChannel.canBubble())); } /**