Allow clearing your own call status. (#5959)

* Allow clearing your own call status.

* Clarify the names of the SettingsScreenUserStatusRow.Mode cases.
This commit is contained in:
Doug
2026-07-31 18:15:42 +01:00
committed by GitHub
parent f5a1a7d952
commit 94cd9590b5
11 changed files with 128 additions and 41 deletions
@@ -56,11 +56,11 @@ struct SettingsScreenViewState: BindableState {
var userStatusRowMode: SettingsScreenUserStatusRow.Mode {
if bindings.isShowingCustomStatusField {
.custom(emoji: bindings.customStatusEmoji)
} else if let rawStatus = userProfile.status.raw {
.show(rawStatus)
.customStatusInput(emoji: bindings.customStatusEmoji)
} else if let displayedStatus = userProfile.status.displayed {
.showingStatus(displayedStatus)
} else {
.pick
.pickStatusButton
}
}
}
@@ -107,7 +107,9 @@ enum SettingsScreenViewAction {
/// Show the emoji picker to select the emoji for the custom status.
case pickCustomEmoji
/// Set the user's status to the provided value.
case set(UserStatus.Raw?)
case set(UserStatus.Raw)
/// Clears the user's currently displayed status.
case clear(UserStatus.Displayed)
/// Cancel user status picking/input.
case cancel
}