mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
App Layout: Cancel and Back on Spaces Bottom Sheet
- Fixed
This commit is contained in:
@@ -35,20 +35,21 @@ class SpaceSelectorViewModel: SpaceSelectorViewModelType, SpaceSelectorViewModel
|
||||
|
||||
// MARK: - Setup
|
||||
|
||||
static func makeViewModel(service: SpaceSelectorServiceProtocol) -> SpaceSelectorViewModelProtocol {
|
||||
return SpaceSelectorViewModel(service: service)
|
||||
static func makeViewModel(service: SpaceSelectorServiceProtocol, showCancel: Bool) -> SpaceSelectorViewModelProtocol {
|
||||
return SpaceSelectorViewModel(service: service, showCancel: showCancel)
|
||||
}
|
||||
|
||||
private init(service: SpaceSelectorServiceProtocol) {
|
||||
private init(service: SpaceSelectorServiceProtocol, showCancel: Bool) {
|
||||
self.service = service
|
||||
super.init(initialViewState: Self.defaultState(service: service))
|
||||
super.init(initialViewState: Self.defaultState(service: service, showCancel: showCancel))
|
||||
}
|
||||
|
||||
private static func defaultState(service: SpaceSelectorServiceProtocol) -> SpaceSelectorViewState {
|
||||
private static func defaultState(service: SpaceSelectorServiceProtocol, showCancel: Bool) -> SpaceSelectorViewState {
|
||||
let parentName = service.parentSpaceNameSubject.value
|
||||
return SpaceSelectorViewState(items: service.spaceListSubject.value,
|
||||
selectedSpaceId: service.selectedSpaceId,
|
||||
navigationTitle: parentName ?? VectorL10n.spaceSelectorTitle)
|
||||
navigationTitle: parentName ?? VectorL10n.spaceSelectorTitle,
|
||||
showCancel: showCancel)
|
||||
}
|
||||
|
||||
// MARK: - Public
|
||||
|
||||
Reference in New Issue
Block a user