From 4e58edadbdedc47977f8e3f0dc0c76e527aafe15 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Sat, 25 Apr 2020 00:11:44 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/handler/login.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/handler/login.py b/module/handler/login.py index 32d390551..84ca7dfca 100644 --- a/module/handler/login.py +++ b/module/handler/login.py @@ -9,7 +9,7 @@ class LoginHandler(Combat): def handle_app_login(self): logger.hr('App login') - confirm_timer = Timer(2) + confirm_timer = Timer(1) while 1: 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): logger.info('Login success') if self.appear(MAIN_CHECK): - confirm_timer.start() - - if confirm_timer.started() and confirm_timer.reached(): - logger.info('Login to main confirm') - break + if confirm_timer.reached(): + logger.info('Login to main confirm') + break + else: + confirm_timer.reset() return True