Fix edit messages showing as new notifications bug.

This commit is contained in:
Cody Henthorne
2025-07-01 12:57:44 -04:00
committed by GitHub
parent 939f2f82b1
commit 6aab622c96
2 changed files with 18 additions and 5 deletions

View File

@@ -160,9 +160,11 @@ object NotificationFactory {
val threadsThatNewlyAlerted: MutableSet<ConversationId> = mutableSetOf()
state.conversations.forEach { conversation ->
if (conversation.thread == visibleThread && conversation.hasNewNotifications()) {
Log.internal().i(TAG, "Thread is visible, notifying in thread. notificationId: ${conversation.notificationId}")
notifyInThread(context, conversation.recipient, lastAudibleNotification)
if (conversation.thread == visibleThread) {
if (conversation.hasNewNotifications()) {
Log.internal().i(TAG, "Thread is visible, notifying in thread. notificationId: ${conversation.notificationId}")
notifyInThread(context, conversation.recipient, lastAudibleNotification)
}
} else if (notificationConfigurationChanged || conversation.hasNewNotifications() || alertOverrides.contains(conversation.thread) || !conversation.hasSameContent(previousState.getConversation(conversation.thread))) {
if (conversation.hasNewNotifications()) {
threadsThatNewlyAlerted += conversation.thread