diff --git a/Monal/Classes/GeneralSettings.swift b/Monal/Classes/GeneralSettings.swift index 5675c5bed..f5beba9bc 100644 --- a/Monal/Classes/GeneralSettings.swift +++ b/Monal/Classes/GeneralSettings.swift @@ -121,6 +121,9 @@ class GeneralSettingsDefaultsDB: ObservableObject { @defaultsDB("hardlinkFiletransfersIntoDocuments") var hardlinkFiletransfersIntoDocuments: Bool + + @defaultsDB("showAdvancedUI") + var showAdvancedUI: Bool } @@ -235,6 +238,10 @@ struct UserInterfaceSettings: View { .font(.footnote) .fixedSize(horizontal: false, vertical: true) } + SettingsToggle(isOn: $generalSettingsDefaultsDB.showAdvancedUI) { + Text("Show advanced options in UI") + Text("Show power-user options in settings and other parts of the user interface.") + } } } .navigationBarTitle(Text("User Interface"), displayMode: .inline) @@ -280,17 +287,18 @@ struct SecuritySettings: View { Text("Every new contact will have encryption enabled, but already known contacts will preserve their encryption settings.") } - SettingsToggle(isOn: $generalSettingsDefaultsDB.useDnssecForAllConnections) { - Text("Use DNSSEC validation for all connections") - Text( + if generalSettingsDefaultsDB.showAdvancedUI { + SettingsToggle(isOn: $generalSettingsDefaultsDB.useDnssecForAllConnections) { + Text("Use DNSSEC validation for all connections") + Text( """ Use DNSSEC to validate all DNS query responses before connecting to the IP address designated \ in the DNS response.\n\ While being more secure, this can lead to connection problems in certain networks \ like hotel wifi, ugly mobile carriers etc. """ - ) - } + ) + } SettingsToggle(isOn: $generalSettingsDefaultsDB.webrtcAllowP2P) { Text("Calls: Allow P2P sessions") @@ -399,7 +407,7 @@ struct PrivacySettingsSubview: View { #if !IS_QUICKSY SettingsToggle(isOn: $generalSettingsDefaultsDB.webrtcUseFallbackTurn) { Text("Calls: Allow TURN fallback to Monal-Servers") - Text("This will make calls possible even if your XMPP server does not provide a TURN server.") + Text("This will make calls possible even if your XMPP server does not provide a TURN server, but leaks your IP to Monal's servers if your XMPP server does not provide a TURN server.") } #endif } diff --git a/Monal/Classes/MLXMPPManager.m b/Monal/Classes/MLXMPPManager.m index 0a3b38cd7..9ef35687c 100644 --- a/Monal/Classes/MLXMPPManager.m +++ b/Monal/Classes/MLXMPPManager.m @@ -155,6 +155,8 @@ -(void) defaultSettings [self upgradeBoolUserSettingsIfUnset:@"hardlinkFiletransfersIntoDocuments" toDefault:YES]; + [self upgradeBoolUserSettingsIfUnset:@"showAdvancedUI" toDefault:NO]; + // //always show onboarding on simulator for now // #if TARGET_OS_SIMULATOR // [[HelperTools defaultsDB] setBool:NO forKey:@"hasCompletedOnboarding"];