mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 03:20:50 +02:00
Show bottom sheet in rename session screen
This commit is contained in:
+2
@@ -58,6 +58,8 @@ final class UserSessionNameCoordinator: Coordinator, Presentable {
|
||||
self.updateName(newName)
|
||||
case .cancel:
|
||||
self.completion?(.cancel)
|
||||
case .learnMore:
|
||||
self.completion?(.learnMore)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@ 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
|
||||
@@ -32,6 +34,8 @@ enum UserSessionNameViewModelResult {
|
||||
case cancel
|
||||
/// Update the session name to the supplied string.
|
||||
case updateName(String)
|
||||
/// The user tapped the learn more button.
|
||||
case learnMore
|
||||
}
|
||||
|
||||
// MARK: View
|
||||
@@ -52,8 +56,6 @@ struct UserSessionNameBindings {
|
||||
var sessionName: String
|
||||
/// The currently displayed alert's info value otherwise `nil`.
|
||||
var alertInfo: AlertInfo<Int>?
|
||||
/// Specifies if the informational bottom sheet is onscreen or not
|
||||
var showBottomSheet: Bool = false
|
||||
}
|
||||
|
||||
enum UserSessionNameViewAction {
|
||||
@@ -61,4 +63,6 @@ enum UserSessionNameViewAction {
|
||||
case done
|
||||
/// The user tapped the cancel button.
|
||||
case cancel
|
||||
/// The user tapped the learn more button.
|
||||
case learnMore
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ class UserSessionNameViewModel: UserSessionNameViewModelType, UserSessionNameVie
|
||||
completion?(.updateName(state.bindings.sessionName))
|
||||
case .cancel:
|
||||
completion?(.cancel)
|
||||
case .learnMore:
|
||||
completion?(.learnMore)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,7 @@ struct UserSessionName: View {
|
||||
|
||||
InlineTextButton(VectorL10n.manageSessionNameInfo("%@"),
|
||||
tappableText: VectorL10n.manageSessionNameInfoLink) {
|
||||
hideKeyboard()
|
||||
viewModel.showBottomSheet = true
|
||||
viewModel.send(viewAction: .learnMore)
|
||||
}
|
||||
.foregroundColor(theme.colors.secondaryContent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user