diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/MessageTable.kt b/app/src/main/java/org/thoughtcrime/securesms/database/MessageTable.kt index 17abbd0bbd..4b78a2d5f3 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/MessageTable.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/MessageTable.kt @@ -4668,7 +4668,7 @@ open class MessageTable(context: Context?, databaseHelper: SignalDatabase) : Dat return readableDatabase .select(*MMS_PROJECTION) .from(TABLE_NAME) - .where("$NOTIFIED = 0 AND $STORY_TYPE = 0 AND ($READ = 0 OR $REACTIONS_UNREAD = 1 ${if (stickyQuery.isNotEmpty()) "OR ($stickyQuery)" else ""})") + .where("$NOTIFIED = 0 AND $STORY_TYPE = 0 AND $LATEST_REVISION_ID IS NULL AND ($READ = 0 OR $REACTIONS_UNREAD = 1 ${if (stickyQuery.isNotEmpty()) "OR ($stickyQuery)" else ""})") .orderBy("$DATE_RECEIVED ASC") .run() } diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationItem.kt b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationItem.kt index 0740222222..cddb0fc1a5 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationItem.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationItem.kt @@ -204,7 +204,7 @@ sealed class NotificationItem(val threadRecipient: Recipient, protected val reco class MessageNotification(threadRecipient: Recipient, record: MessageRecord) : NotificationItem(threadRecipient, record) { override val timestamp: Long = record.timestamp override val authorRecipient: Recipient = record.fromRecipient.resolve() - override val isNewNotification: Boolean = notifiedTimestamp == 0L + override val isNewNotification: Boolean = notifiedTimestamp == 0L && !record.isEditMessage val hasSelfMention = record.hasSelfMention() private var thumbnailInfo: ThumbnailInfo? = null