Stop in-chat notification sounds if notifications are disabled.

This commit is contained in:
Michelle Tang
2025-01-06 12:41:57 -05:00
parent de6b9bc4ef
commit e1d8870160
3 changed files with 8 additions and 5 deletions

View File

@@ -308,7 +308,8 @@ object NotificationFactory {
}
private fun notifyInThread(context: Context, recipient: Recipient, lastAudibleNotification: Long) {
if (!SignalStore.settings.isMessageNotificationsInChatSoundsEnabled ||
if (!NotificationChannels.getInstance().areNotificationsEnabled() ||
!SignalStore.settings.isMessageNotificationsInChatSoundsEnabled ||
ServiceUtil.getAudioManager(context).ringerMode != AudioManager.RINGER_MODE_NORMAL ||
(System.currentTimeMillis() - lastAudibleNotification) < DefaultMessageNotifier.MIN_AUDIBLE_PERIOD_MILLIS
) {