Skip to content

Commit f2db5d9

Browse files
committed
fix: fix twice pause.
1 parent b2e8ede commit f2db5d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

webf/lib/src/launcher/controller.dart

+2
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,7 @@ class WebFController {
13331333

13341334
// Pause all timers and callbacks if kraken page are invisible.
13351335
void pause() {
1336+
if (_paused) return;
13361337
_paused = true;
13371338
module.pauseTimer();
13381339
module.pauseAnimationFrame();
@@ -1341,6 +1342,7 @@ class WebFController {
13411342

13421343
// Resume all timers and callbacks if kraken page now visible.
13431344
void resume() {
1345+
if (!_paused) return;
13441346
_paused = false;
13451347
flushPendingCallbacks();
13461348
module.resumeTimer();

0 commit comments

Comments
 (0)