@@ -61,20 +61,20 @@ def download_app_index(self, json_url):
6161self .apps .append (App (app ["name" ],app ["publisher" ],app ["short_description" ],app ["long_description" ],app ["icon_url" ],app ["download_url" ],app ["fullname" ],app ["version" ],app ["category" ],app ["activities" ]))
6262except Exception as e :
6363print (f"Warning: could not add app from{ json_url } to apps list:{ e } " )
64- # Remove duplicates based on app.name
65- seen = set ()
66- self .apps = [app for app in self .apps if not (app .fullname in seen or seen .add (app .fullname ))]
67- # Sort apps by app.name
68- self .apps .sort (key = lambda x :x .name .lower ())# Use .lower() for case-insensitive sorting
69- time .sleep_ms (200 )
70- self .update_ui_threadsafe_if_foreground (self .please_wait_label .add_flag ,lv .obj .FLAG .HIDDEN )
71- self .update_ui_threadsafe_if_foreground (self .create_apps_list )
72- time .sleep (0.1 )# give the UI time to display the app list before starting to download
73- self .download_icons ()
7464except Exception as e :
7565print (f"ERROR: could not parse reponse.text JSON:{ e } " )
7666finally :
7767response .close ()
68+ # Remove duplicates based on app.name
69+ seen = set ()
70+ self .apps = [app for app in self .apps if not (app .fullname in seen or seen .add (app .fullname ))]
71+ # Sort apps by app.name
72+ self .apps .sort (key = lambda x :x .name .lower ())# Use .lower() for case-insensitive sorting
73+ time .sleep_ms (200 )
74+ self .update_ui_threadsafe_if_foreground (self .please_wait_label .add_flag ,lv .obj .FLAG .HIDDEN )
75+ self .update_ui_threadsafe_if_foreground (self .create_apps_list )
76+ time .sleep (0.1 )# give the UI time to display the app list before starting to download
77+ self .download_icons ()
7878
7979def create_apps_list (self ):
8080print ("create_apps_list" )
@@ -129,7 +129,11 @@ def download_icons(self):
129129app .icon_data = self .download_icon_data (app .icon_url )
130130if app .icon_data :
131131print ("download_icons has icon_data, showing it..." )
132- image_icon_widget = app .image_icon_widget
132+ image_icon_widget = None
133+ try :
134+ image_icon_widget = app .image_icon_widget
135+ except Exception as e :
136+ print (f"app.image_icon_widget got exception{ e } " )
133137if image_icon_widget :
134138image_dsc = lv .image_dsc_t ({
135139'data_size' :len (app .icon_data ),