Merge pull request #124 from yangsfang/yangsfang-patch-1

Fix throttler calling an action twice
This commit is contained in:
Shawn 2023-10-02 14:02:12 -06:00 committed by GitHub
commit a04d8bbb71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ class Throttler {
void _callAction() { void _callAction() {
_action?.call(); // If we have an action queued up, complete it. _action?.call(); // If we have an action queued up, complete it.
_action = null; // Once an action is called, do not call the same action again unless another action is queued.
_timer = null; _timer = null;
} }