Do avatar placeholder in SwiftUI, Add AvatarViewModel, Add dependency injection for MxMediaManager dependency.

This commit is contained in:
David Langley
2021-08-15 00:36:15 +01:00
parent 90e686efd0
commit 807dfdfce2
28 changed files with 490 additions and 190 deletions
@@ -144,7 +144,7 @@ final class RoomNotificationSettingsViewController: UIViewController {
activityPresenter.removeCurrentActivityIndicator(animated: true)
}
self.viewState = viewState
if let avatarData = viewState.legacyAvatarData {
if case let .uiKit(avatarData) = viewState.avatarData {
mainTableView.tableHeaderView = avatarView
avatarView.configure(viewData: avatarData)
avatarView.update(theme: theme)
@@ -41,16 +41,3 @@ extension RoomNotificationSettingsCell: Themable {
selectedBackgroundView?.backgroundColor = theme.selectedBackgroundColor
}
}
fileprivate extension RoomNotificationState {
var title: String {
switch self {
case .all:
return VectorL10n.roomNotifsSettingsAllMessages
case .mentionsAndKeywordsOnly:
return VectorL10n.roomNotifsSettingsMentionsAndKeywords
case .mute:
return VectorL10n.roomNotifsSettingsNone
}
}
}