Skip to content

Commit

Permalink
Hide the debug menu when debug mode is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Feb 5, 2024
1 parent e4aeb59 commit 7440969
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions DuckDuckGo/SettingsDebugView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ struct SettingsDebugView: View {
@EnvironmentObject var viewModel: SettingsViewModel

var body: some View {
Section(header: Text("Debug")) {

SettingsCellView(label: "All debug options",
action: { viewModel.presentLegacyView(.debug) },
disclosureIndicator: true,
isButton: true)

if viewModel.state.debugModeEnabled {
Section(header: Text("Debug")) {

SettingsCellView(label: "All debug options",
action: { viewModel.presentLegacyView(.debug) },
disclosureIndicator: true,
isButton: true)

}
}

}
Expand Down

0 comments on commit 7440969

Please sign in to comment.