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
6
alas.py
6
alas.py
@ -126,7 +126,11 @@ class AzurLaneAutoScript:
|
||||
def goto_main(self):
|
||||
from module.handler.login import LoginHandler
|
||||
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()
|
||||
UI(self.config, device=self.device).ui_goto_main()
|
||||
|
||||
|
@ -16,8 +16,10 @@ class AppControl(Adb, Uiautomator2):
|
||||
else:
|
||||
package = self.app_current_adb()
|
||||
|
||||
package = package.strip(' \t\r\n')
|
||||
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):
|
||||
package = self.config.Emulator_PackageName
|
||||
|
Loading…
Reference in New Issue
Block a user