Fix: Exit combat status page at startup

This commit is contained in:
LmeSzinc 2023-08-27 02:14:43 +08:00
parent cf9b261eb5
commit 610df2af6d

View File

@ -8,6 +8,7 @@ from tasks.base.assets.assets_base_page import CLOSE
from tasks.base.page import Page, page_main
from tasks.base.popup import PopupHandler
from tasks.base.state import StateMixin
from tasks.combat.assets.assets_combat_finish import COMBAT_EXIT
from tasks.combat.assets.assets_combat_prepare import COMBAT_PREPARE
@ -282,6 +283,8 @@ class UI(PopupHandler, StateMixin):
if self.appear(COMBAT_PREPARE, interval=5):
logger.info(f'UI additional: {COMBAT_PREPARE} -> {CLOSE}')
self.device.click(CLOSE)
if self.appear_then_click(COMBAT_EXIT, interval=5):
return True
return False