mirror of
https://github.com/LmeSzinc/AzurLaneAutoScript.git
synced 2025-01-09 05:47:30 +08:00
Fix: Spaces around package name cause inequality
This commit is contained in:
parent
f891689bee
commit
5348c6f58f
8
alas.py
8
alas.py
@ -126,9 +126,13 @@ class AzurLaneAutoScript:
|
|||||||
def goto_main(self):
|
def goto_main(self):
|
||||||
from module.handler.login import LoginHandler
|
from module.handler.login import LoginHandler
|
||||||
from module.ui.ui import UI
|
from module.ui.ui import UI
|
||||||
if not self.device.app_is_running():
|
if self.device.app_is_running():
|
||||||
|
logger.info('App is already running, goto main page')
|
||||||
|
UI(self.config, device=self.device).ui_goto_main()
|
||||||
|
else:
|
||||||
|
logger.info('App is not running, start app and goto main page')
|
||||||
LoginHandler(self.config, device=self.device).app_start()
|
LoginHandler(self.config, device=self.device).app_start()
|
||||||
UI(self.config, device=self.device).ui_goto_main()
|
UI(self.config, device=self.device).ui_goto_main()
|
||||||
|
|
||||||
def research(self):
|
def research(self):
|
||||||
from module.research.research import RewardResearch
|
from module.research.research import RewardResearch
|
||||||
|
@ -16,8 +16,10 @@ class AppControl(Adb, Uiautomator2):
|
|||||||
else:
|
else:
|
||||||
package = self.app_current_adb()
|
package = self.app_current_adb()
|
||||||
|
|
||||||
|
package = package.strip(' \t\r\n')
|
||||||
logger.attr('Package_name', package)
|
logger.attr('Package_name', package)
|
||||||
return package == self.config.Emulator_PackageName
|
target = self.config.Emulator_PackageName.strip(' \t\r\n')
|
||||||
|
return package == target
|
||||||
|
|
||||||
def app_start(self):
|
def app_start(self):
|
||||||
package = self.config.Emulator_PackageName
|
package = self.config.Emulator_PackageName
|
||||||
|
Loading…
Reference in New Issue
Block a user