Add avatar view and title

This commit is contained in:
langleyd
2021-07-04 10:46:17 +01:00
parent 3f7d45100c
commit 7a2ba9dfb4
7 changed files with 129 additions and 5 deletions
@@ -39,11 +39,11 @@ final class RoomNotificationSettingsViewModel: RoomNotificationSettingsViewModel
// MARK: - Setup
init(roomNotificationRepository: RoomNotificationSettingsServiceType, roomEncrypted: Bool) {
init(roomNotificationRepository: RoomNotificationSettingsServiceType, roomEncrypted: Bool, avatarViewData: RoomNotificationSettingsAvatarViewData?) {
self.roomNotificationRepository = roomNotificationRepository
let notificationState = Self.mapNotificationStateOnRead(encrypted: roomEncrypted, state: roomNotificationRepository.notificationState)
self.state = RoomNotificationSettingsViewState(roomEncrypted: roomEncrypted, saving: false, notificationState: notificationState)
self.state = RoomNotificationSettingsViewState(roomEncrypted: roomEncrypted, saving: false, notificationState: notificationState, avatarData: avatarViewData)
self.roomNotificationRepository.observeNotificationState { [weak self] state in
guard let self = self else { return }