@@ -66,17 +66,17 @@ async def download_app_index(self, json_url):
6666 except Exception as e :
6767 print (f"Warning: could not add app from { json_url } to apps list: { e } " )
6868 except Exception as e :
69- self .update_ui_threadsafe_if_foreground ( self . please_wait_label .set_text , f"ERROR: could not parse reponse.text JSON: { e } " )
69+ self .please_wait_label .set_text ( f"ERROR: could not parse reponse.text JSON: { e } " )
7070 return
71- self .update_ui_threadsafe_if_foreground ( self . please_wait_label .set_text , f"Download successful, building list..." )
71+ self .please_wait_label .set_text ( f"Download successful, building list..." )
7272 await TaskManager .sleep (0.1 ) # give the UI time to display the app list before starting to download
7373 print ("Remove duplicates based on app.name" )
7474 seen = set ()
7575 self .apps = [app for app in self .apps if not (app .fullname in seen or seen .add (app .fullname ))]
7676 print ("Sort apps by app.name" )
7777 self .apps .sort (key = lambda x : x .name .lower ()) # Use .lower() for case-insensitive sorting
7878 print ("Creating apps list..." )
79- self .update_ui_threadsafe_if_foreground ( self . create_apps_list )
79+ self .create_apps_list ( )
8080 await TaskManager .sleep (0.1 ) # give the UI time to display the app list before starting to download
8181 print ("awaiting self.download_icons()" )
8282 await self .download_icons ()
@@ -151,7 +151,7 @@ async def download_icons(self):
151151 'data_size' : len (app .icon_data ),
152152 'data' : app .icon_data
153153 })
154- self . update_ui_threadsafe_if_foreground ( image_icon_widget .set_src , image_dsc ) # add update_ui_threadsafe() for background?
154+ image_icon_widget .set_src ( image_dsc ) # add update_ui_threadsafe() for background?
155155 print ("Finished downloading icons." )
156156
157157 def show_app_detail (self , app ):
0 commit comments