Skip to content

Commit

Permalink
Delete on appear disclaimer & privacy policy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
W1W1-M committed Nov 21, 2021
1 parent b45f69b commit 21ab015
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions Sources/PackAPrefPane/Views/Legal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,7 @@ struct Legal: View {
if prefPaneData.showTOS {
TermsOfService(prefPaneData: prefPaneData)
}
}.onAppear{
if prefPaneData.disclaimerAcceptedCheck { // If disclaimer check activated run disclaimer accepted check
if !PrefPaneHelper.checkDisclaimerAccepted(disclaimerAcceptedDefaultsKey: prefPaneData.disclaimerAcceptedDefaultsKey) {
alert = Legal.alerts.disclaimerAlert
alertPresented.toggle()
}
}
if prefPaneData.privacyPolicyAcceptedCheck { // If privacy policy check activated run privacy policy accepted check
if !PrefPaneHelper.checkPrivacyPolicyAccepted(privacyPolicyAcceptedDefaultsKey: prefPaneData.privacyPolicyAcceptedDefaultsKey) {
alert = Legal.alerts.privacyAlert
alertPresented.toggle()
}
}
}
.alert(isPresented: $alertPresented, content: { // alert switch cases
}.alert(isPresented: $alertPresented, content: { // alert switch cases
switch alert {
case .disclaimerAlert:
return Alert(
Expand Down

0 comments on commit 21ab015

Please sign in to comment.