Skip to content

Commit

Permalink
Remove temporary pixel for Subscription Progress Indicator (#2829)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414235014887631/1207008719518535/f
Tech Design URL:
CC:

Description:
Removes temporary pixel
  • Loading branch information
afterxleep authored May 17, 2024
1 parent 87792c9 commit e02bbcf
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,20 +279,13 @@ final class SubscriptionFlowViewModel: ObservableObject {
private func setTransactionStatus(_ status: SubscriptionTransactionStatus) {
self.state.transactionStatus = status

// Fire a temp pixel if status is not back to idle in 60s
// Remove block when removing pixel
// https://app.asana.com/0/1204099484721401/1207003487111848/f

// Invalidate existing timer if any
transactionStatusTimer?.invalidate()

if status != .idle {
// Schedule a new timer
transactionStatusTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: false) { [weak self] _ in
guard let strongSelf = self else { return }
if strongSelf.state.transactionStatus != .idle {
Pixel.fire(pixel: .privacyProTransactionProgressNotHiddenAfter60s, error: nil)
}
strongSelf.transactionStatusTimer?.invalidate()
strongSelf.transactionStatusTimer = nil
}
Expand Down

0 comments on commit e02bbcf

Please sign in to comment.