Expose the log level in developer settings

This commit is contained in:
Stefan Ceriu
2023-08-23 14:58:44 +03:00
committed by Stefan Ceriu
parent beeb5fc83c
commit a19f5a4186
9 changed files with 44 additions and 39 deletions
@@ -43,6 +43,7 @@ enum DeveloperOptionsScreenViewAction {
}
protocol DeveloperOptionsProtocol: AnyObject {
var logLevel: TracingConfiguration.LogLevel { get set }
var shouldCollapseRoomStateEvents: Bool { get set }
var userSuggestionsEnabled: Bool { get set }
var readReceiptsEnabled: Bool { get set }
@@ -22,6 +22,15 @@ struct DeveloperOptionsScreen: View {
var body: some View {
Form {
Picker(selection: $context.logLevel) {
ForEach(TracingConfiguration.LogLevel.allCases, id: \.self) { logLevel in
Text(logLevel.rawValue.capitalized)
}
} label: {
Text("Log level")
Text("Requires app reboot")
}
Section("Timeline") {
Toggle(isOn: $context.shouldCollapseRoomStateEvents) {
Text("Collapse room state events")