From 7db7eec98f634c81f86cbf932c32eab50e6fef64 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Wed, 7 Dec 2022 09:44:10 +0200 Subject: [PATCH] Prevent the sliding sync proxy base URL value from being stored in the UserDefaults if it hasn't changed on homeserver confirmation --- .../ServerSelection/ServerSelectionViewModel.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ElementX/Sources/Screens/Authentication/ServerSelection/ServerSelectionViewModel.swift b/ElementX/Sources/Screens/Authentication/ServerSelection/ServerSelectionViewModel.swift index 25670571b..5456cef47 100644 --- a/ElementX/Sources/Screens/Authentication/ServerSelection/ServerSelectionViewModel.swift +++ b/ElementX/Sources/Screens/Authentication/ServerSelection/ServerSelectionViewModel.swift @@ -32,7 +32,8 @@ class ServerSelectionViewModel: ServerSelectionViewModelType, ServerSelectionVie override func process(viewAction: ServerSelectionViewAction) async { switch viewAction { case .confirm: - if !state.bindings.slidingSyncProxyAddress.isEmpty { + if !state.bindings.slidingSyncProxyAddress.isEmpty, + state.bindings.slidingSyncProxyAddress != ElementSettings.shared.slidingSyncProxyBaseURLString { ElementSettings.shared.slidingSyncProxyBaseURLString = state.bindings.slidingSyncProxyAddress }