Display the notification mode for each room in the the room list (#1595)

Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
Nicolas Mauri
2023-08-31 13:15:38 +02:00
committed by GitHub
parent f0fad25d09
commit 3ab7b1b1c7
17 changed files with 145 additions and 63 deletions
@@ -266,13 +266,16 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
private func buildRoom(with details: RoomSummaryDetails, invalidated: Bool) -> HomeScreenRoom {
let identifier = invalidated ? "invalidated-" + details.id : details.id
let notificationMode = details.notificationMode == .allMessages || appSettings.notificationSettingsEnabled == false ? nil : details.notificationMode
return HomeScreenRoom(id: identifier,
roomId: details.id,
name: details.name,
hasUnreads: details.unreadNotificationCount > 0,
timestamp: details.lastMessageFormattedTimestamp,
lastMessage: .init(attributedString: details.lastMessage, isLoading: false),
avatarURL: details.avatarURL)
avatarURL: details.avatarURL,
notificationMode: notificationMode)
}
private func updateVisibleRange(_ range: Range<Int>) {