mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
Show rename sheet
This commit is contained in:
+21
-1
@@ -59,7 +59,9 @@ final class UserSessionNameCoordinator: Coordinator, Presentable {
|
||||
case .cancel:
|
||||
self.completion?(.cancel)
|
||||
case .learnMore:
|
||||
self.completion?(.learnMore)
|
||||
self.showInfoSheet(parameters: .init(title: VectorL10n.userSessionRenameSessionTitle,
|
||||
description: VectorL10n.userSessionRenameSessionDescription,
|
||||
action: .init(text: VectorL10n.userSessionGotIt, action: {})))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,4 +99,22 @@ final class UserSessionNameCoordinator: Coordinator, Presentable {
|
||||
private func stopLoading() {
|
||||
loadingIndicator = nil
|
||||
}
|
||||
|
||||
private func showInfoSheet(parameters: InfoSheetCoordinatorParameters) {
|
||||
let coordinator = InfoSheetCoordinator(parameters: parameters)
|
||||
|
||||
coordinator.completion = { [weak self, weak coordinator] result in
|
||||
guard let self = self, let coordinator = coordinator else { return }
|
||||
|
||||
switch result {
|
||||
case .actionTriggered:
|
||||
self.toPresentable().dismiss(animated: true)
|
||||
self.remove(childCoordinator: coordinator)
|
||||
}
|
||||
}
|
||||
|
||||
add(childCoordinator: coordinator)
|
||||
coordinator.start()
|
||||
toPresentable().present(coordinator.toPresentable(), animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ enum UserSessionNameCoordinatorResult {
|
||||
case cancel
|
||||
/// The user successfully updated the name of the session.
|
||||
case sessionNameUpdated
|
||||
/// The user tapped the learn more button.
|
||||
case learnMore
|
||||
}
|
||||
|
||||
// MARK: View model
|
||||
|
||||
Reference in New Issue
Block a user