Merge pull request #124 from yangsfang/yangsfang-patch-1
Fix throttler calling an action twice
This commit is contained in:
commit
a04d8bbb71
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user