diff --git a/appstore_backend/apps.json b/appstore_backend/apps.json index 28d181aa..09288b31 100644 --- a/appstore_backend/apps.json +++ b/appstore_backend/apps.json @@ -51,6 +51,18 @@ "category": "art" } +,{ +"name": "HelloWorld", +"publisher": "ACME Inc", +"short_description": "Minimal app", +"long_description": "Demonstrates the simplest app.", +"icon_url": "http://demo.lnpiggy.com:2121/apps/com.example.helloworld_0.0.1.mpk_icon_64x64.png", +"download_url": "http://demo.lnpiggy.com:2121/apps/com.example.helloworld_0.0.1.mpk", +"fullname": "com.example.helloworld", +"version": "0.0.1", +"entrypoint": "assets/hello.py", +"category": "development" +} ,{ "name": "IMU Tester", "publisher": "ACME Inc", diff --git a/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py b/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py index da2802c4..90c39742 100644 --- a/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py +++ b/internal_filesystem/builtin/apps/com.example.appstore/assets/appstore.py @@ -241,11 +241,11 @@ def download_apps(json_url): def download_icons(): for app in apps: - print("Downloading icon for app ") + print(f"Downloading icon for {app.name}") image_dsc = download_icon(app.icon_url) app.image_dsc = image_dsc # save it for the app detail page - lv.async_call(lambda l, id=app.image_dsc: app.image.set_src(id), None) - time.sleep_ms(50) # wait until image updated + lv.async_call(lambda l: app.image.set_src(image_dsc), None) + time.sleep_ms(round(th.duration*1.5)) # not waiting here will result in some async_calls() not being executed print("Finished downloading icons...")