mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
App Layout: added space invites in space bottom sheet
This commit is contained in:
@@ -42,6 +42,7 @@ class SpaceSelectorViewModel: SpaceSelectorViewModelType, SpaceSelectorViewModel
|
||||
private init(service: SpaceSelectorServiceProtocol, showCancel: Bool) {
|
||||
self.service = service
|
||||
super.init(initialViewState: Self.defaultState(service: service, showCancel: showCancel))
|
||||
setupObservers()
|
||||
}
|
||||
|
||||
private static func defaultState(service: SpaceSelectorServiceProtocol, showCancel: Bool) -> SpaceSelectorViewState {
|
||||
@@ -52,6 +53,13 @@ class SpaceSelectorViewModel: SpaceSelectorViewModelType, SpaceSelectorViewModel
|
||||
showCancel: showCancel)
|
||||
}
|
||||
|
||||
private func setupObservers() {
|
||||
service.spaceListSubject.sink { [weak self] spaceList in
|
||||
self?.state.items = spaceList
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
override func process(viewAction: SpaceSelectorViewAction) {
|
||||
|
||||
Reference in New Issue
Block a user