mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-07 21:08:28 +00:00
Show the last message state in the room list.
This commit is contained in:
@@ -29,6 +29,8 @@ struct RoomSummary {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
enum LastMessageState { case sending, failed }
|
||||
|
||||
let room: Room
|
||||
|
||||
@@ -46,6 +48,7 @@ struct RoomSummary {
|
||||
|
||||
let lastMessage: AttributedString?
|
||||
let lastMessageDate: Date?
|
||||
let lastMessageState: LastMessageState?
|
||||
let unreadMessagesCount: UInt
|
||||
let unreadMentionsCount: UInt
|
||||
let unreadNotificationsCount: UInt
|
||||
@@ -117,6 +120,7 @@ extension RoomSummary {
|
||||
|
||||
lastMessage = AttributedString(string)
|
||||
lastMessageDate = .mock
|
||||
lastMessageState = nil
|
||||
unreadMessagesCount = hasUnreadMessages ? 1 : 0
|
||||
unreadMentionsCount = hasUnreadMentions ? 1 : 0
|
||||
unreadNotificationsCount = hasUnreadNotifications ? 1 : 0
|
||||
|
||||
Reference in New Issue
Block a user