always cancel screenshot timers
This commit is contained in:
1 parent
471c2b7b2d
commit
9a04b2d89a
1 file changed
+2
+2
@@ -148,6 +148,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
||||
if (next.isLoading == false &&
|
||||
(_periodicScreenshotUpdate?.isActive ?? false) == false) {
|
||||
_timerPaused = false;
|
||||
_periodicScreenshotUpdate?.cancel();
|
||||
_periodicScreenshotUpdate = Timer.periodic(
|
||||
widget.screenshotPeriod,
|
||||
_timerTick,
|
||||
@@ -475,6 +476,7 @@ class _BrowserViewState extends ConsumerState<BrowserView>
|
||||
}
|
||||
case AppLifecycleState.resumed:
|
||||
if (_timerPaused) {
|
||||
_periodicScreenshotUpdate?.cancel();
|
||||
_periodicScreenshotUpdate = Timer.periodic(
|
||||
widget.screenshotPeriod,
|
||||
_timerTick,
|
||||
|
||||
Reference in new issue
Block a user