Skip to content

Commit

Permalink
feat: use LocalStorageRepository methods directly
Browse files Browse the repository at this point in the history
Not using `ParselyTracker` as middleman, reduces complexity
  • Loading branch information
wzieba committed Nov 10, 2023
1 parent 1be8dfc commit e16df63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,6 @@ private boolean isReachable() {
return netInfo != null && netInfo.isConnectedOrConnecting();
}

void purgeEventsQueue() {
localStorageRepository.purgeStoredQueue();
}

/**
* Start the timer to flush events to Parsely.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class SendEvents(
.fold(
onSuccess = {
ParselyTracker.PLog("Pixel request success")
parselyTracker.purgeEventsQueue()
localStorageRepository.purgeStoredQueue()
ParselyTracker.PLog("Event queue empty, flush timer cleared.")
parselyTracker.stopFlushTimer()
},
Expand Down

0 comments on commit e16df63

Please sign in to comment.