From 01cf106574a2841cbd825ca0e37254f0a0f7e08f Mon Sep 17 00:00:00 2001 From: Soner Yuksel Date: Tue, 15 Aug 2023 14:37:30 -0400 Subject: [PATCH] Pull Request comments are addressed --- Sources/Brave/Frontend/Settings/Shields/OptionToggleView.swift | 2 +- Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/Brave/Frontend/Settings/Shields/OptionToggleView.swift b/Sources/Brave/Frontend/Settings/Shields/OptionToggleView.swift index 4a18d6612b8..61baedeb87c 100644 --- a/Sources/Brave/Frontend/Settings/Shields/OptionToggleView.swift +++ b/Sources/Brave/Frontend/Settings/Shields/OptionToggleView.swift @@ -13,7 +13,7 @@ struct OptionToggleView: View { @ObservedObject var option: Preferences.Option let onChange: ShieldToggleView.OnChangeCallback? - init(title: String, subtitle: String? = nil, + init(title: String, subtitle: String?, option: Preferences.Option, onChange: ShieldToggleView.OnChangeCallback? = nil) { self.title = title self.subtitle = subtitle diff --git a/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift b/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift index 895a005be9a..06dabc83fd0 100644 --- a/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift +++ b/Sources/Brave/Frontend/Settings/Tabs/PrivateTabsView.swift @@ -68,6 +68,7 @@ struct PrivateTabsView: View { footer: privateBrowsingOnly.value ? Text("") : Text(Strings.TabsSettings.persistentPrivateBrowsingDescription)) { if !privateBrowsingOnly.value { OptionToggleView(title: Strings.TabsSettings.persistentPrivateBrowsingTitle, + subtitle: nil, option: Preferences.Privacy.persistentPrivateBrowsing) { newValue in Task { @MainActor in if newValue { @@ -88,6 +89,7 @@ struct PrivateTabsView: View { switch localAuthenticationType { case .faceID, .touchID, .pinCode: OptionToggleView(title: browsingLockTitle, + subtitle: nil, option: Preferences.Privacy.privateBrowsingLock) case .noAuthentication: Toggle(isOn: .constant(false)) {