mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user