mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 17:42:45 +02:00
Address PR comments
Add more docs. Rename PhotoPickerPresenter to MediaPickerPresenter. Use a Character for the placeholder avatar rather than a string.
This commit is contained in:
@@ -19,7 +19,9 @@ import Foundation
|
||||
// MARK: View model
|
||||
|
||||
enum OnboardingDisplayNameViewModelResult {
|
||||
/// The user would like to save the entered display name.
|
||||
case save(String)
|
||||
/// Move on to the next screen in the flow without setting a display name.
|
||||
case skip
|
||||
}
|
||||
|
||||
@@ -27,20 +29,27 @@ enum OnboardingDisplayNameViewModelResult {
|
||||
|
||||
struct OnboardingDisplayNameViewState: BindableState {
|
||||
var bindings: OnboardingDisplayNameBindings
|
||||
/// Any error that occurred during display name validation otherwise `nil`.
|
||||
var validationErrorMessage: String?
|
||||
|
||||
/// The string to be displayed in the text field's footer.
|
||||
var textFieldFooterMessage: String {
|
||||
validationErrorMessage ?? VectorL10n.onboardingDisplayNameHint
|
||||
}
|
||||
}
|
||||
|
||||
struct OnboardingDisplayNameBindings {
|
||||
/// The display name string entered by the user.
|
||||
var displayName: String
|
||||
/// The currently displayed alert's info value otherwise `nil`.
|
||||
var alertInfo: AlertInfo<Int>?
|
||||
}
|
||||
|
||||
enum OnboardingDisplayNameViewAction {
|
||||
/// The display name needs validation.
|
||||
case validateDisplayName
|
||||
/// The user would like to save the entered display name.
|
||||
case save
|
||||
/// Move on to the next screen in the flow without setting a display name.
|
||||
case skip
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user