tweak in-chat-sounds

This commit is contained in:
B. Petersen
2020-05-21 00:41:04 +02:00
parent 96114c415d
commit 2b8b54ce10
@@ -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