From 74409694a810a8348e207c4d35b3c1d1282997ef Mon Sep 17 00:00:00 2001 From: Daniel Bernal Date: Mon, 5 Feb 2024 16:41:18 +0100 Subject: [PATCH] Hide the debug menu when debug mode is not enabled --- DuckDuckGo/SettingsDebugView.swift | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/DuckDuckGo/SettingsDebugView.swift b/DuckDuckGo/SettingsDebugView.swift index 39615314c2..8baacecbf5 100644 --- a/DuckDuckGo/SettingsDebugView.swift +++ b/DuckDuckGo/SettingsDebugView.swift @@ -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) + + } } }