Fixes #322 - Developer options menu (#581)

This commit is contained in:
Stefan Ceriu
2023-02-15 13:07:06 +02:00
committed by GitHub
parent 6211f121a0
commit 4fd24a6c16
21 changed files with 390 additions and 7 deletions
@@ -18,7 +18,6 @@ import SwiftUI
struct SettingsScreen: View {
@State private var showingLogoutConfirmation = false
@Environment(\.colorScheme) private var colorScheme
@ScaledMetric private var avatarSize = AvatarSize.user(on: .settings).value
@ScaledMetric private var menuIconSize = 30.0
@@ -40,6 +39,11 @@ struct SettingsScreen: View {
simplifiedSection
.listRowBackground(Color.element.formRowBackground)
if context.viewState.showDeveloperOptions {
developerOptionsSection
.listRowBackground(Color.element.formRowBackground)
}
signOutSection
.listRowBackground(Color.element.formRowBackground)
}
@@ -89,6 +93,16 @@ struct SettingsScreen: View {
}
}
private var developerOptionsSection: some View {
Section {
SettingsDefaultRow(title: ElementL10n.settingsDeveloperOptions,
image: Image(systemName: "hammer.circle")) {
context.send(viewAction: .developerOptions)
}
.accessibilityIdentifier("sessionVerificationButton")
}
}
private var simplifiedSection: some View {
Section {
SettingsPickerRow(title: ElementL10n.settingsTimelineStyle,