Remove delivered notifications for rooms that have meantime become fully read and have messages newer than what's delivered

- this is a best effort solution to cleanup outdated notifications when using multiple clients and reading them elsewhere
This commit is contained in:
Stefan Ceriu
2025-04-17 15:01:01 +03:00
committed by Stefan Ceriu
parent e14672e1f6
commit 899c33a5ad
12 changed files with 128 additions and 29 deletions
@@ -28,6 +28,7 @@ class HomeScreenRoomTests: XCTestCase {
avatarURL: nil,
heroes: [],
lastMessage: nil,
lastMessageDate: nil,
lastMessageFormattedTimestamp: nil,
unreadMessagesCount: unreadMessagesCount,
unreadMentionsCount: unreadMentionsCount,
+1
View File
@@ -86,6 +86,7 @@ class LoggingTests: XCTestCase {
avatarURL: nil,
heroes: [.init(userID: "", displayName: heroName)],
lastMessage: AttributedString(lastMessage),
lastMessageDate: nil,
lastMessageFormattedTimestamp: "Now",
unreadMessagesCount: 0,
unreadMentionsCount: 0,
+1
View File
@@ -62,6 +62,7 @@ class RoomSummaryTests: XCTestCase {
avatarURL: hasRoomAvatar ? roomDetails.avatarURL : nil,
heroes: heroes,
lastMessage: nil,
lastMessageDate: nil,
lastMessageFormattedTimestamp: nil,
unreadMessagesCount: 0,
unreadMentionsCount: 0,