mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 20:15:57 +08:00
Fix: Change LOGIN_ANNOUNCE to MAINTENANCE_ANNOUNCE in ui_additional (#2509)
* Add: Handle LOGIN_ANNOUNCE in ui_additional * Fix: Handle MAINTENANCE_ANNOUNCE in ui_additioal
This commit is contained in:
@@ -60,7 +60,7 @@ def patch_uiautomator2():
|
|||||||
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
|
So we patch `uiautomator2/init.py` to a local assets cache `uiautomator2cache/cache`.
|
||||||
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
|
appdir = os.path.join(os.path.expanduser('~'), '.uiautomator2')
|
||||||
to:
|
to:
|
||||||
appdir = os.path.join(__file__, '../../uiautomator2cache')
|
appdir = os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))
|
||||||
|
|
||||||
And we also remove minicap installations since emulators doesn't need it.
|
And we also remove minicap installations since emulators doesn't need it.
|
||||||
for url in self.minicap_urls:
|
for url in self.minicap_urls:
|
||||||
@@ -71,7 +71,7 @@ def patch_uiautomator2():
|
|||||||
"""
|
"""
|
||||||
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
|
cache_dir = './toolkit/Lib/site-packages/uiautomator2cache/cache'
|
||||||
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
|
init_file = './toolkit/Lib/site-packages/uiautomator2/init.py'
|
||||||
appdir = "os.path.join(__file__, '../../uiautomator2cache')"
|
appdir = "os.path.abspath(os.path.join(__file__, '../../uiautomator2cache'))"
|
||||||
|
|
||||||
if not os.path.exists(init_file):
|
if not os.path.exists(init_file):
|
||||||
logger.info('uiautomator2 is not installed skip patching')
|
logger.info('uiautomator2 is not installed skip patching')
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from module.freebies.assets import PURCHASE_POPUP
|
|||||||
from module.handler.assets import (AUTO_SEARCH_MENU_EXIT, BATTLE_PASS_NOTICE,
|
from module.handler.assets import (AUTO_SEARCH_MENU_EXIT, BATTLE_PASS_NOTICE,
|
||||||
GAME_TIPS, LOGIN_ANNOUNCE,
|
GAME_TIPS, LOGIN_ANNOUNCE,
|
||||||
LOGIN_CHECK, LOGIN_RETURN_SIGN,
|
LOGIN_CHECK, LOGIN_RETURN_SIGN,
|
||||||
MONTHLY_PASS_NOTICE)
|
MAINTENANCE_ANNOUNCE, MONTHLY_PASS_NOTICE)
|
||||||
from module.handler.info_handler import InfoHandler
|
from module.handler.info_handler import InfoHandler
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from module.map.assets import (FLEET_PREPARATION, MAP_PREPARATION,
|
from module.map.assets import (FLEET_PREPARATION, MAP_PREPARATION,
|
||||||
@@ -558,7 +558,7 @@ class UI(InfoHandler):
|
|||||||
# Login
|
# Login
|
||||||
if self.appear_then_click(LOGIN_CHECK, offset=(30, 30), interval=3):
|
if self.appear_then_click(LOGIN_CHECK, offset=(30, 30), interval=3):
|
||||||
return True
|
return True
|
||||||
if self.appear_then_click(LOGIN_ANNOUNCE, offset=(30, 30), interval=3):
|
if self.appear_then_click(MAINTENANCE_ANNOUNCE, offset=(30, 30), interval=3):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Mistaken click
|
# Mistaken click
|
||||||
|
|||||||
Reference in New Issue
Block a user