mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Update the SDK.
Handles changes that removed support for the sliding sync proxy.
This commit is contained in:
+2
-3
@@ -22,10 +22,9 @@ final class DeveloperOptionsScreenCoordinator: CoordinatorProtocol {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(isUsingNativeSlidingSync: Bool) {
|
||||
init() {
|
||||
viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings,
|
||||
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL,
|
||||
isUsingNativeSlidingSync: isUsingNativeSlidingSync)
|
||||
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL)
|
||||
|
||||
viewModel.actions
|
||||
.sink { [weak self] action in
|
||||
|
||||
-6
@@ -13,12 +13,7 @@ enum DeveloperOptionsScreenViewModelAction {
|
||||
|
||||
struct DeveloperOptionsScreenViewState: BindableState {
|
||||
let elementCallBaseURL: URL
|
||||
let isUsingNativeSlidingSync: Bool
|
||||
var bindings: DeveloperOptionsScreenViewStateBindings
|
||||
|
||||
var slidingSyncFooter: String {
|
||||
"The method used to configure sliding sync when signing in. Changing this setting has no effect until you sign out.\n\nYour current session is using \(isUsingNativeSlidingSync ? "native sliding sync." : "a sliding sync proxy.")"
|
||||
}
|
||||
}
|
||||
|
||||
// periphery: ignore - subscripts are seen as false positive
|
||||
@@ -42,7 +37,6 @@ enum DeveloperOptionsScreenViewAction {
|
||||
|
||||
protocol DeveloperOptionsProtocol: AnyObject {
|
||||
var logLevel: LogLevel { get set }
|
||||
var slidingSyncDiscovery: AppSettings.SlidingSyncDiscovery { get set }
|
||||
var publicSearchEnabled: Bool { get set }
|
||||
var hideUnreadMessagesBadge: Bool { get set }
|
||||
var fuzzyRoomListSearchEnabled: Bool { get set }
|
||||
|
||||
+2
-2
@@ -17,9 +17,9 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(developerOptions: DeveloperOptionsProtocol, elementCallBaseURL: URL, isUsingNativeSlidingSync: Bool) {
|
||||
init(developerOptions: DeveloperOptionsProtocol, elementCallBaseURL: URL) {
|
||||
let bindings = DeveloperOptionsScreenViewStateBindings(developerOptions: developerOptions)
|
||||
let state = DeveloperOptionsScreenViewState(elementCallBaseURL: elementCallBaseURL, isUsingNativeSlidingSync: isUsingNativeSlidingSync, bindings: bindings)
|
||||
let state = DeveloperOptionsScreenViewState(elementCallBaseURL: elementCallBaseURL, bindings: bindings)
|
||||
|
||||
super.init(initialViewState: state)
|
||||
}
|
||||
|
||||
+1
-14
@@ -32,18 +32,6 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
Section {
|
||||
Picker("Discovery", selection: $context.slidingSyncDiscovery) {
|
||||
Text("Proxy only").tag(AppSettings.SlidingSyncDiscovery.proxy)
|
||||
Text("Automatic").tag(AppSettings.SlidingSyncDiscovery.native)
|
||||
Text("Force Native ⚠️").tag(AppSettings.SlidingSyncDiscovery.forceNative)
|
||||
}
|
||||
} header: {
|
||||
Text("Sliding Sync")
|
||||
} footer: {
|
||||
Text(context.viewState.slidingSyncFooter)
|
||||
}
|
||||
|
||||
Section("Room List") {
|
||||
Toggle(isOn: $context.publicSearchEnabled) {
|
||||
Text("Public search")
|
||||
@@ -175,8 +163,7 @@ private struct LogLevelConfigurationView: View {
|
||||
|
||||
struct DeveloperOptionsScreen_Previews: PreviewProvider {
|
||||
static let viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings,
|
||||
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL,
|
||||
isUsingNativeSlidingSync: true)
|
||||
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL)
|
||||
static var previews: some View {
|
||||
NavigationStack {
|
||||
DeveloperOptionsScreen(context: viewModel.context)
|
||||
|
||||
Reference in New Issue
Block a user