New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fixes an issue with multiple timers being scheduled #529
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
if let queueTimer { | ||
queueTimer.invalidate() | ||
self.queueTimer = nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add this to deinit
of this class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let queueTimer { | |
queueTimer.invalidate() | |
self.queueTimer = nil | |
} | |
self.queueTimer?.invalidate() | |
self.queueTimer = nil |
Nit-picky suggestion. I think this code reads easier without the if
because we are re-constructing the queueTimer
in the line below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the instance is created and maintained from a static class, I don't think its required.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
==========================================
+ Coverage 55.85% 56.17% +0.31%
==========================================
Files 132 132
Lines 3713 3715 +2
==========================================
+ Hits 2074 2087 +13
+ Misses 1639 1628 -11 ☔ View full report in Codecov by Sentry. |
## [2.12.1](2.12.0...2.12.1) (2024-02-15) ### Bug Fixes * fixes an issue with multiple timers being scheduled ([#529](#529)) ([ec383f1](ec383f1))
While testing on standalone I noticed that timers weren't being stopped when a new one was scheduled, this should fix the issue.