You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
appstore: reduce icon delay
This commit is contained in:
@@ -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...")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user