SP3.1: Update room settings for Spaces element-ios#5231

- Changed the Room Settings screen according to the new design
- Implemented the room access flow
- Added room upgrade support
- Implemented the room suggestion screen
This commit is contained in:
Gil Eluard
2022-01-13 15:53:45 +01:00
parent 069e79e24e
commit 086afb1835
78 changed files with 3755 additions and 196 deletions

View File

@@ -51,14 +51,14 @@ class MatrixItemChooserViewModel: MatrixItemChooserViewModelType, MatrixItemChoo
let message = detail
let emptyListMessage = VectorL10n.spacesNoResultFoundTitle
return MatrixItemChooserViewState(title: title, message: message, emptyListMessage: emptyListMessage, items: matrixItemChooserService.itemsSubject.value, selectedItemIds: matrixItemChooserService.selectedItemIdsSubject.value, loading: false)
return MatrixItemChooserViewState(title: title, message: message, emptyListMessage: emptyListMessage, sections: matrixItemChooserService.sectionsSubject.value, selectedItemIds: matrixItemChooserService.selectedItemIdsSubject.value, loadingText: matrixItemChooserService.loadingText, loading: false)
}
private func startObservingItems() {
let itemsUpdatePublisher = matrixItemChooserService.itemsSubject
.map(MatrixItemChooserStateAction.updateItems)
let sectionsUpdatePublisher = matrixItemChooserService.sectionsSubject
.map(MatrixItemChooserStateAction.updateSections)
.eraseToAnyPublisher()
dispatch(actionPublisher: itemsUpdatePublisher)
dispatch(actionPublisher: sectionsUpdatePublisher)
let selectionPublisher = matrixItemChooserService.selectedItemIdsSubject
.map(MatrixItemChooserStateAction.updateSelection)
@@ -99,8 +99,8 @@ class MatrixItemChooserViewModel: MatrixItemChooserViewModelType, MatrixItemChoo
override class func reducer(state: inout MatrixItemChooserViewState, action: MatrixItemChooserStateAction) {
switch action {
case .updateItems(let items):
state.items = items
case .updateSections(let sections):
state.sections = sections
case .updateSelection(let selectedItemIds):
state.selectedItemIds = selectedItemIds
case .loadingState(let loading):