Fix: 修复登录

This commit is contained in:
LmeSzinc 2020-04-25 00:11:44 +08:00
parent ccc4a889ca
commit 4e58edadbd

View File

@ -9,7 +9,7 @@ class LoginHandler(Combat):
def handle_app_login(self): def handle_app_login(self):
logger.hr('App login') logger.hr('App login')
confirm_timer = Timer(2) confirm_timer = Timer(1)
while 1: while 1:
self.device.screenshot() self.device.screenshot()
@ -30,11 +30,11 @@ class LoginHandler(Combat):
if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=0.5): if self.info_bar_count() and self.appear_then_click(LOGIN_CHECK, interval=0.5):
logger.info('Login success') logger.info('Login success')
if self.appear(MAIN_CHECK): if self.appear(MAIN_CHECK):
confirm_timer.start() if confirm_timer.reached():
logger.info('Login to main confirm')
if confirm_timer.started() and confirm_timer.reached(): break
logger.info('Login to main confirm') else:
break confirm_timer.reset()
return True return True