From 192f4765c3b7350363847bc49af35a9111a33326 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Wed, 13 Aug 2025 09:36:40 +0100 Subject: [PATCH] Remove the share_pos developer option. (#4406) --- ElementX/Sources/Application/Settings/AppSettings.swift | 4 ---- .../DeveloperOptionsScreenModels.swift | 1 - .../View/DeveloperOptionsScreen.swift | 7 ------- ElementX/Sources/Services/Client/ClientProxy.swift | 2 +- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index c2cce4755..4cfbd9401 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -60,7 +60,6 @@ final class AppSettings { case knockingEnabled case threadsEnabled case developerOptionsEnabled - case sharePosEnabledV2 case multipleAttachmentUploadEnabled // Doug's tweaks 🔧 @@ -352,9 +351,6 @@ final class AppSettings { @UserPreference(key: UserDefaultsKeys.developerOptionsEnabled, defaultValue: isDevelopmentBuild, storageType: .userDefaults(store)) var developerOptionsEnabled - @UserPreference(key: UserDefaultsKeys.sharePosEnabledV2, defaultValue: true, storageType: .userDefaults(store)) - var sharePosEnabled - #endif // MARK: - Shared diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index 5c72786c9..dc7ee9ad1 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -51,7 +51,6 @@ protocol DeveloperOptionsProtocol: AnyObject { var publicSearchEnabled: Bool { get set } var fuzzyRoomListSearchEnabled: Bool { get set } var knockingEnabled: Bool { get set } - var sharePosEnabled: Bool { get set } } extension AppSettings: DeveloperOptionsProtocol { } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index 61ffc9ab5..cf1e12210 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -65,13 +65,6 @@ struct DeveloperOptionsScreen: View { } } - Section("Sync") { - Toggle(isOn: $context.sharePosEnabled) { - Text("Share pos") - Text("Keep the sliding sync pos to make initial syncs faster. Requires an app restart to take effect. Might make the sync unstable.") - } - } - Section { Toggle(isOn: $context.enableOnlySignedDeviceIsolationMode) { Text("Exclude insecure devices when sending/receiving messages") diff --git a/ElementX/Sources/Services/Client/ClientProxy.swift b/ElementX/Sources/Services/Client/ClientProxy.swift index 744f94a71..eef2270a6 100644 --- a/ElementX/Sources/Services/Client/ClientProxy.swift +++ b/ElementX/Sources/Services/Client/ClientProxy.swift @@ -1192,7 +1192,7 @@ private struct ClientProxyServices { let syncService = try await client .syncService() .withCrossProcessLock() - .withSharePos(enable: appSettings.sharePosEnabled) + .withSharePos(enable: true) .finish() let roomListService = syncService.roomListService()