Skip to content

Commit

Permalink
Fix forceful sign outs during purchase (#2641)
Browse files Browse the repository at this point in the history
  • Loading branch information
miasma13 authored Mar 26, 2024
1 parent a254140 commit 5b81a5d
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -524,8 +524,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
cachePolicy: .reloadIgnoringLocalCacheData) {
if subscription.isActive {
DailyPixel.fire(pixel: .privacyProSubscriptionActive)
} else {
accountManager.signOut()
}
}

4 changes: 3 additions & 1 deletion DuckDuckGo/SettingsViewModel.swift
Original file line number Diff line number Diff line change
@@ -403,7 +403,9 @@ extension SettingsViewModel {
}
}
} else {
// Sign out in case subscription is no longer active
// Sign out in case subscription is no longer active, reset the state
state.subscription.hasActiveSubscription = false
state.subscription.isSubscriptionPendingActivation = false
signOutUser()
}

0 comments on commit 5b81a5d

Please sign in to comment.