1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-09 20:04:52 +00:00

perf: login

This commit is contained in:
RedDeadDepresso
2024-01-09 19:57:30 +00:00
committed by YoursFunny
parent a74d05aeda
commit 6cca8f1082
3 changed files with 16 additions and 21 deletions
+7 -3
View File
@@ -98,7 +98,7 @@ class UI(MainPage):
continue
logger.info("Unknown page, try to back")
if u2_back:
self.device.u2.press("back")
self.device.back()
u2_back = False
else:
self.device.click(BACK)
@@ -178,7 +178,11 @@ class UI(MainPage):
continue
if back_timer.reached_and_reset():
self.device.u2.press("back")
if self.match_color(LOGIN_LOADING, interval=5, threshold=80) or self.appear_trademark_year():
from tasks.login.login import Login
Login(self.config, self.device).handle_app_login()
continue
self.device.back()
logger.info("Unknown page, try to back")
# Reset connection
@@ -439,7 +443,7 @@ class UI(MainPage):
self.device.screenshot()
if self.match_color(check_button):
break
self.device.u2.press("back")
self.device.back()
if timer.reached():
logger.error("Failed to close popup")
raise RequestHumanTakeover