1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-17 06:39:28 +08:00

Fix: wait for intermittent manjuu loading

This commit is contained in:
guoh064
2025-08-01 00:37:20 +09:00
parent 3ee810000c
commit fca3522391
2 changed files with 21 additions and 2 deletions

View File

@@ -548,4 +548,23 @@ class InfoHandler(ModuleBase):
self.wait_until_manjuu_disappear()
return True
else:
return False
return False
def ensure_no_manjuu(self, timeout=1.5, skip_first_screenshot=True):
logger.info('Ensure no manjuu')
manjuu_timer = Timer(timeout, count=6).start()
handled = False
while 1:
if skip_first_screenshot:
skip_first_screenshot = False
else:
self.device.screenshot()
if self.handle_manjuu():
manjuu_timer.reset()
handled = True
if manjuu_timer.reached():
break
return handled