Adopt sliding sync discovery for authentication.

This commit is contained in:
Doug
2024-08-29 12:23:08 +01:00
committed by Stefan Ceriu
parent c9603dce55
commit 4925884f6c
11 changed files with 148 additions and 71 deletions
@@ -32,11 +32,16 @@ struct DeveloperOptionsScreen: View {
LogLevelConfigurationView(logLevel: $context.logLevel)
}
Section("Sliding Sync") {
Toggle(isOn: $context.simplifiedSlidingSyncEnabled) {
Text("Simplified Sliding Sync")
Text("When toggled you'll be logged out of the app and will need to log in again.")
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("Message Pinning") {
@@ -174,7 +179,8 @@ private struct LogLevelConfigurationView: View {
struct DeveloperOptionsScreen_Previews: PreviewProvider {
static let viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings,
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL)
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL,
isUsingNativeSlidingSync: true)
static var previews: some View {
NavigationStack {
DeveloperOptionsScreen(context: viewModel.context)