Skip to content

Commit

Permalink
fix: analytics requested repeatedly after declined - WPB-11332
Browse files Browse the repository at this point in the history
  • Loading branch information
johnxnguyen committed Oct 17, 2024
1 parent 8942a84 commit e09b6b7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ struct DisableAnalyticsUseCase: DisableAnalyticsUseCaseProtocol {
let provider: (any AnalyticsEventTrackerProvider)?

func invoke() throws {
try service.disableTracking()
do {
try service.disableTracking()
} catch AnalyticsServiceError.serviceIsNotConfigured {
// Already disabled, don't consider it an error
}

provider?.setAnalyticsEventTracker(nil)
}

Expand Down

0 comments on commit e09b6b7

Please sign in to comment.