Simplify and fix settings app

This commit is contained in:
Thomas Farstrike
2025-10-30 13:09:27 +01:00
parent 51368a3816
commit caab563461
2 changed files with 4 additions and 4 deletions
@@ -1,4 +1,5 @@
from mpos.apps import Activity, ActivityNavigator, Intent
from mpos.apps import Activity, Intent
from mpos.navigator import ActivityNavigator
import mpos.config
import mpos.ui
+2 -3
View File
@@ -21,7 +21,7 @@ def good_stack_size():
return stacksize
# Run the script in the current thread:
def execute_script(script_source, is_file, cwd=None, classname=None, app=None):
def execute_script(script_source, is_file, cwd=None, classname=None):
import utime # for timing read and compile
thread_id = _thread.get_ident()
compile_name = 'script' if not is_file else script_source
@@ -123,7 +123,7 @@ def start_app(fullname):
print(f"WARNING: start_app can't start {fullname} because it doesn't have a main_launcher_activity")
return
start_script_fullpath = f"{app.installed_path}/{app.main_launcher_activity.get('entrypoint')}"
execute_script(start_script_fullpath, True, app.installed_path + "/assets/", app.main_launcher_activity.get("classname"), app)
execute_script(start_script_fullpath, True, app.installed_path + "/assets/", app.main_launcher_activity.get("classname"))
# Launchers have the bar, other apps don't have it
if app.is_valid_launcher():
mpos.ui.topmenu.open_bar()
@@ -143,4 +143,3 @@ def restart_launcher():
start_app(app.fullname)
break