1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 09:48:20 +08:00

Opt: Stop refreshing tasks when the window is not visible (#710)

May fix #710
This commit is contained in:
18870
2021-11-06 21:26:42 +08:00
parent a60f523e9e
commit a18a7f81f9
3 changed files with 39 additions and 3 deletions

View File

@@ -8,6 +8,8 @@ from pywebio.session import defer_call, info, run_js
class Base:
def __init__(self) -> None:
self.alive = True
# Whether window is visible
self.visible = True
# Device type
self.is_mobile = info.user_agent.is_mobile
# Task handler