diff --git a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java index c86ac91ca..2cc898c87 100644 --- a/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -289,6 +289,13 @@ public class NotificationCenter { DcChat dcChat = dcContext.getChat(chatId); + if (chatId == visibleChatId) { + // in-chat sounds are not related to notifications, + // they can be enabled/disabled independently + InChatSounds.getInstance(dcContext.context).playIncomingSound(); + return; + } + if (!Prefs.isNotificationsEnabled(context) || Prefs.isChatMuted(context, chatId)) { return; } @@ -299,11 +306,6 @@ public class NotificationCenter { return; } - if (chatId == visibleChatId) { - InChatSounds.getInstance(dcContext.context).playIncomingSound(); - return; - } - NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context); // get notification text as a single line