Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca57a5a

Browse files
fix esp32 run if there's no focus group
1 parentb728aa7 commitca57a5a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎internal_filesystem/lib/mpos/apps.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ def _launch_activity(intent, result_callback=None):
346346
activity._result_callback=result_callback# Pass callback to activity
347347
start_time=utime.ticks_ms()
348348
# Remove objects from previous screens from the focus group:
349-
lv.group_get_default().remove_all_objs()# might be better to save and restore the group for "back" actions
349+
group=lv.group_get_default()
350+
ifgroup:# on esp32 this may not be set
351+
group.remove_all_objs()# might be better to save and restore the group for "back" actions
350352
activity.onCreate()
351353
end_time=utime.ticks_diff(utime.ticks_ms(),start_time)
352354
print(f"apps.py _launch_activity: activity.onCreate took{end_time}ms")

‎internal_filesystem/lib/mpos/clipboard.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def get():
1111
defpaste_text(text):# called when CTRL-V is pressed on the keyboard
1212
print(f"mpos.ui.clipboard.py paste_text adding{text}")
1313
group=lv.group_get_default()
14+
ifnotgroup:
15+
return
1416
focused_obj=group.get_focused()
1517
iffocused_objandisinstance(focused_obj,lv.textarea):
1618
focused_obj.add_text(text)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp