appstore: reduce icon delay

This commit is contained in:
Thomas Farstrike
2025-05-16 16:10:55 +02:00
parent d4eb0b6ea1
commit ce9354adb0
2 changed files with 15 additions and 3 deletions
+12
View File
@@ -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",
@@ -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...")