mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Make Element Call widget URL configurable (#2971)
This commit is contained in:
+5
-7
@@ -38,14 +38,11 @@ struct DeveloperOptionsScreen: View {
|
||||
}
|
||||
|
||||
Section("Element Call") {
|
||||
TextField(context.elementCallBaseURL.absoluteString, text: $elementCallBaseURLString)
|
||||
TextField(context.viewState.elementCallBaseURL.absoluteString, text: $elementCallBaseURLString)
|
||||
.submitLabel(.done)
|
||||
.onSubmit {
|
||||
guard let url = URL(string: elementCallBaseURLString) else {
|
||||
return
|
||||
}
|
||||
|
||||
context.elementCallBaseURL = url
|
||||
guard let url = URL(string: elementCallBaseURLString) else { return }
|
||||
context.elementCallBaseURLOverride = url
|
||||
}
|
||||
.autocorrectionDisabled(true)
|
||||
.autocapitalization(.none)
|
||||
@@ -148,7 +145,8 @@ private struct LogLevelConfigurationView: View {
|
||||
// MARK: - Previews
|
||||
|
||||
struct DeveloperOptionsScreen_Previews: PreviewProvider {
|
||||
static let viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings)
|
||||
static let viewModel = DeveloperOptionsScreenViewModel(developerOptions: ServiceLocator.shared.settings,
|
||||
elementCallBaseURL: ServiceLocator.shared.settings.elementCallBaseURL)
|
||||
static var previews: some View {
|
||||
NavigationStack {
|
||||
DeveloperOptionsScreen(context: viewModel.context)
|
||||
|
||||
Reference in New Issue
Block a user