mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 10:17:38 +08:00
Fix: Detected as mail empty if MAIL_MANAGE click missed
This commit is contained in:
parent
39fceddb52
commit
26fe3dda1d
@ -41,6 +41,7 @@ class MailWhite(UI):
|
||||
MAIL_MANAGE
|
||||
])
|
||||
timeout = Timer(0.6, count=1)
|
||||
has_mail = False
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
@ -51,7 +52,7 @@ class MailWhite(UI):
|
||||
if self.appear(MAIL_BATCH_CLAIM, offset=(20, 20)):
|
||||
logger.info('Mail entered')
|
||||
return True
|
||||
if self.appear(GOTO_MAIN_WHITE, offset=(20, 20)):
|
||||
if not has_mail and self.appear(GOTO_MAIN_WHITE, offset=(20, 20)):
|
||||
timeout.start()
|
||||
if timeout.reached():
|
||||
logger.info('Mail empty')
|
||||
@ -59,6 +60,7 @@ class MailWhite(UI):
|
||||
|
||||
# Click
|
||||
if self.appear_then_click(MAIL_MANAGE, offset=(30, 30), interval=3):
|
||||
has_mail = True
|
||||
continue
|
||||
if self.ui_main_appear_then_click(page_mail, offset=(30, 30), interval=3):
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user