mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
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:
committed by
Stefan Ceriu
parent
e14672e1f6
commit
899c33a5ad
@@ -40,6 +40,7 @@ struct RoomSummary {
|
||||
let avatarURL: URL?
|
||||
let heroes: [UserProfileProxy]
|
||||
let lastMessage: AttributedString?
|
||||
let lastMessageDate: Date?
|
||||
let lastMessageFormattedTimestamp: String?
|
||||
let unreadMessagesCount: UInt
|
||||
let unreadMentionsCount: UInt
|
||||
@@ -95,6 +96,7 @@ extension RoomSummary {
|
||||
avatarURL = nil
|
||||
heroes = []
|
||||
lastMessage = AttributedString(string)
|
||||
lastMessageDate = .now
|
||||
lastMessageFormattedTimestamp = "Now"
|
||||
unreadMessagesCount = hasUnreadMessages ? 1 : 0
|
||||
unreadMentionsCount = hasUnreadMentions ? 1 : 0
|
||||
|
||||
Reference in New Issue
Block a user