From 127809cbc37b3178c33289d4a61c2e8ff86c56c8 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Tue, 10 Jun 2025 17:44:13 +0200 Subject: [PATCH] mpos.apps: clean focus group --- internal_filesystem/lib/mpos/apps.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal_filesystem/lib/mpos/apps.py b/internal_filesystem/lib/mpos/apps.py index 64efba6a..5f1da7e1 100644 --- a/internal_filesystem/lib/mpos/apps.py +++ b/internal_filesystem/lib/mpos/apps.py @@ -345,6 +345,8 @@ class ActivityNavigator: activity.intent = intent activity._result_callback = result_callback # Pass callback to activity start_time = utime.ticks_ms() + # Remove objects from previous screens from the focus group: + lv.group_get_default().remove_all_objs() # might be better to save and restore the group for "back" actions activity.onCreate() end_time = utime.ticks_diff(utime.ticks_ms(), start_time) print(f"apps.py _launch_activity: activity.onCreate took {end_time}ms")