mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
feat(healthchat): advertise the account status in settings
Pending approval and an incomplete profile were only visible in the members tab, which a new user has no reason to open.
This commit is contained in:
@@ -10,30 +10,22 @@ import SwiftUI
|
||||
|
||||
enum SettingsScreenViewModelAction {
|
||||
case close
|
||||
|
||||
case userDetails
|
||||
case userStatusEmojiPicker(EmojiPickerScreenContinuation)
|
||||
|
||||
case addAccount
|
||||
|
||||
case manageAccount(url: URL)
|
||||
case linkNewDevice
|
||||
case notifications
|
||||
case secureBackup
|
||||
case moderationAndSafety
|
||||
case manageAccount(url: URL)
|
||||
case analytics
|
||||
case appLock
|
||||
case reportBug
|
||||
|
||||
case about
|
||||
case blockedUsers
|
||||
case secureBackup
|
||||
case notifications
|
||||
case advancedSettings
|
||||
case labs
|
||||
case developerOptions
|
||||
case logout
|
||||
case deactivateAccount
|
||||
|
||||
case mediaUploadQuality
|
||||
case appLock
|
||||
case locationSharing
|
||||
case analytics
|
||||
case labs
|
||||
case about
|
||||
|
||||
case developerOptions
|
||||
}
|
||||
|
||||
enum SettingsScreenSecuritySectionMode {
|
||||
@@ -46,7 +38,6 @@ struct SettingsScreenViewState: BindableState {
|
||||
var userProfile: UserProfile
|
||||
var showUserStatusInput = false
|
||||
var showLinkNewDeviceButton: Bool
|
||||
var showAddAccountButton: Bool
|
||||
var accountProfileURL: URL?
|
||||
var showAccountDeactivation: Bool
|
||||
var showDeveloperOptions: Bool
|
||||
@@ -54,13 +45,16 @@ struct SettingsScreenViewState: BindableState {
|
||||
var securitySectionMode = SettingsScreenSecuritySectionMode.none
|
||||
var showSecuritySectionBadge = false
|
||||
|
||||
var showBlockedUsers = false
|
||||
let showAnalyticsSettings: Bool
|
||||
|
||||
let isBugReportServiceEnabled: Bool
|
||||
|
||||
let navigationBarVisibility: Visibility
|
||||
|
||||
var bindings: SettingsScreenViewStateBindings
|
||||
let appHooks: AppHooks
|
||||
|
||||
var bindings = SettingsScreenViewStateBindings()
|
||||
|
||||
var userStatusRowMode: SettingsScreenUserStatusRow.Mode {
|
||||
if bindings.isShowingCustomStatusField {
|
||||
@@ -74,8 +68,6 @@ struct SettingsScreenViewState: BindableState {
|
||||
}
|
||||
|
||||
struct SettingsScreenViewStateBindings {
|
||||
private let userSettings: UserSettings
|
||||
|
||||
var isPresentingStatusPicker = false
|
||||
var customStatusEmoji: Character = "😄"
|
||||
var isShowingCustomStatusField = false {
|
||||
@@ -87,44 +79,27 @@ struct SettingsScreenViewStateBindings {
|
||||
}
|
||||
|
||||
var isPresentingAccountDeactivationConfirmation = false
|
||||
|
||||
var appAppearance: AppAppearance {
|
||||
get { userSettings.app.appAppearance }
|
||||
set { userSettings.app.appAppearance = newValue }
|
||||
}
|
||||
|
||||
init(userSettings: UserSettings) {
|
||||
self.userSettings = userSettings
|
||||
}
|
||||
}
|
||||
|
||||
enum SettingsScreenViewAction {
|
||||
case close
|
||||
|
||||
case userDetails
|
||||
case userStatus(UserStatusAction)
|
||||
|
||||
case addAccount
|
||||
|
||||
case manageAccount(url: URL)
|
||||
case linkNewDevice
|
||||
case notifications
|
||||
case secureBackup
|
||||
case moderationAndSafety
|
||||
case reportBug
|
||||
|
||||
case logout
|
||||
case deactivateAccount
|
||||
|
||||
case mediaUploadQuality
|
||||
case appLock
|
||||
case locationSharing
|
||||
case analytics
|
||||
case labs
|
||||
case appLock
|
||||
case reportBug
|
||||
case about
|
||||
|
||||
case blockedUsers
|
||||
case secureBackup
|
||||
case linkNewDevice
|
||||
case manageAccount(url: URL)
|
||||
case notifications
|
||||
case enableDeveloperOptions
|
||||
case developerOptions
|
||||
case advancedSettings
|
||||
case labs
|
||||
case logout
|
||||
case deactivateAccount
|
||||
|
||||
enum UserStatusAction {
|
||||
/// Show status picker sheet to select a preset status.
|
||||
|
||||
Reference in New Issue
Block a user