Skip to content

Commit c15bd6c

Browse files
Appstore app: improve UX during (un)install
1 parent bf09cbf commit c15bd6c

File tree

1 file changed

+6
-0
lines changed
  • internal_filesystem/builtin/apps/com.micropythonos.appstore/assets

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,12 @@ def uninstall_app(self, app_fullname):
331331
self.install_button.add_state(lv.STATE.DISABLED)
332332
self.install_label.set_text("Please wait...")
333333
self.progress_bar.remove_flag(lv.obj.FLAG.HIDDEN)
334+
self.progress_bar.set_value(21, True)
335+
time.sleep(1) # seems silly but otherwise it goes so quickly that the user can't tell something happened and gets confused
334336
self.progress_bar.set_value(42, True)
337+
time.sleep(1) # seems silly but otherwise it goes so quickly that the user can't tell something happened and gets confused
335338
PackageManager.uninstall_app(app_fullname)
339+
time.sleep(1) # seems silly but otherwise it goes so quickly that the user can't tell something happened and gets confused
336340
self.progress_bar.set_value(100, False)
337341
self.progress_bar.add_flag(lv.obj.FLAG.HIDDEN)
338342
self.progress_bar.set_value(0, False)
@@ -347,6 +351,7 @@ def download_and_install(self, zip_url, dest_folder, app_fullname):
347351
self.install_label.set_text("Please wait...")
348352
self.progress_bar.remove_flag(lv.obj.FLAG.HIDDEN)
349353
self.progress_bar.set_value(20, True)
354+
time.sleep(1) # seems silly but otherwise it goes so quickly that the user can't tell something happened and gets confused
350355
try:
351356
# Step 1: Download the .mpk file
352357
print(f"Downloading .mpk file from: {zip_url}")
@@ -382,6 +387,7 @@ def download_and_install(self, zip_url, dest_folder, app_fullname):
382387
# Step 2: install it:
383388
PackageManager.install_mpk(temp_zip_path, dest_folder)
384389
# Success:
390+
time.sleep(1) # seems silly but otherwise it goes so quickly that the user can't tell something happened and gets confused
385391
self.progress_bar.set_value(100, False)
386392
self.progress_bar.add_flag(lv.obj.FLAG.HIDDEN)
387393
self.progress_bar.set_value(0, False)

0 commit comments

Comments
 (0)