From bdf53b64a84430cc1a9785450fec0494452c8e80 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 1 Jul 2026 14:59:49 +0100 Subject: [PATCH] Add a feature flag for User Status. --- ElementX/Sources/Application/Settings/AppSettings.swift | 3 +++ .../DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift | 1 + .../DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index 7225e6c51..fedea5b4b 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -417,6 +417,9 @@ final nonisolated class AppSettings: @unchecked Sendable { @UserPreference(defaultValue: AppBuildType.current != .release, volatile: true) var clientPausingAndResumingEnabled: Bool + @UserPreference(defaultValue: false) + var userStatusEnabled: Bool + @UserPreference(defaultValue: AppBuildType.current != .release) var developerOptionsEnabled: Bool diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index 3a47c7fa9..539afbfa5 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -72,6 +72,7 @@ protocol DeveloperOptionsProtocol: AnyObject { var jumpToReadMarkerEnabled: Bool { get set } var linkNewDeviceEnabled: Bool { get set } + var userStatusEnabled: Bool { get set } var roomThreadListEnabled: Bool { get set } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index a46932155..cc93ec787 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -54,6 +54,10 @@ struct DeveloperOptionsScreen: View { Text("Moves search to a separate tab") } + Toggle(isOn: $context.userStatusEnabled) { + Text("User status") + } + context.viewState.appHooks .developerOptionsScreenHook .generalSectionRows()