Skip to content

Commit f831171

Browse files
appstore: use correct thread for updating UI
1 parent f57771c commit f831171

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • internal_filesystem/builtin/apps/com.micropythonos.appstore/assets

internal_filesystem/builtin/apps/com.micropythonos.appstore/assets/appstore.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def download_app_index(self, json_url):
6969
self.apps = [app for app in self.apps if not (app.name in seen or seen.add(app.name))]
7070
# Sort apps by app.name
7171
self.apps.sort(key=lambda x: x.name.lower()) # Use .lower() for case-insensitive sorting
72-
self.please_wait_label.add_flag(lv.obj.FLAG.HIDDEN)
72+
time.sleep_ms(100)
73+
lv.async_call(lambda l: self.please_wait_label.add_flag(lv.obj.FLAG.HIDDEN), None)
7374
lv.async_call(lambda l: self.create_apps_list(), None)
7475
except Exception as e:
7576
print(f"ERROR: could not parse reponse.text JSON: {e}")

0 commit comments

Comments
 (0)