Expose Element Call settings in the developer options. Start using th… (#2039)

* Expose Element Call settings in the developer options. Start using the encryption widget parameter.

* Remove the Element Call feature flag
This commit is contained in:
Stefan Ceriu
2023-11-07 16:12:03 +02:00
committed by GitHub
parent b13abf9cdf
commit 5dcb24add7
13 changed files with 76 additions and 56 deletions
@@ -19,6 +19,7 @@ import SwiftUI
struct DeveloperOptionsScreen: View {
@ObservedObject var context: DeveloperOptionsScreenViewModel.Context
@State private var showConfetti = false
@State private var elementCallBaseURLString = ""
var body: some View {
Form {
@@ -52,10 +53,6 @@ struct DeveloperOptionsScreen: View {
Text("SwiftUI Timeline")
Text("Resets on reboot")
}
Toggle(isOn: $context.elementCallEnabled) {
Text("Element Call")
}
}
Section("Room creation") {
@@ -63,6 +60,25 @@ struct DeveloperOptionsScreen: View {
Text("User suggestions")
}
}
Section("Element Call") {
TextField(context.elementCallBaseURL.absoluteString, text: $elementCallBaseURLString)
.submitLabel(.done)
.onSubmit {
guard let url = URL(string: elementCallBaseURLString) else {
return
}
context.elementCallBaseURL = url
}
.autocorrectionDisabled(true)
.autocapitalization(.none)
.foregroundColor(URL(string: elementCallBaseURLString) == nil ? .red : .primary)
Toggle(isOn: $context.elementCallUseEncryption) {
Text("Use encryption")
}
}
Section {
Button {