From 975efb31a6919f6b82a542e0aba2e5e82cabf5b9 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 29 Apr 2011 18:16:38 +0200 Subject: [PATCH] [sulfur] when a new icon is fetched, emit the UGC data update signal --- sulfur/src/sulfur/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sulfur/src/sulfur/views.py b/sulfur/src/sulfur/views.py index ba9146d9b..32661ec6b 100644 --- a/sulfur/src/sulfur/views.py +++ b/sulfur/src/sulfur/views.py @@ -1796,6 +1796,7 @@ class EntropyPackageView: except WebService.WebServiceException as err: continue + got_something = False # get document urls, store to local cache for icon_doc in icon_docs: cache_key = package_name, icon_doc.repository_id() @@ -1822,13 +1823,16 @@ class EntropyPackageView: except KeyError: pass self.__pkg_ugc_icon_local_path_cache[cache_key] = local_path + got_something = True const_debug_write(__name__, "_ugc_cache_icons: pushed to cache: %s, %s" % ( cache_key, local_path,)) break + return got_something def _fetch_icons_parent(): - _fetch_icons(cache, True) + if _fetch_icons(cache, True): + self._emit_ugc_update() with Privileges(): # run as separate process, avoid blocking the UI