[window] fix: not refreshing all package type after uninstalling a recent installed package

This commit is contained in:
Vinicius Moreira
2019-10-16 16:24:57 -03:00
parent 0e8902942f
commit c8eae5c949
2 changed files with 4 additions and 1 deletions

View File

@@ -375,3 +375,6 @@ class GenericSoftwareManager(SoftwareManager):
if man: if man:
return man.get_screenshots(pkg) return man.get_screenshots(pkg)
def get_working_managers(self):
return [m for m in self.managers if self._can_work(m)]

View File

@@ -481,7 +481,7 @@ class ManageWindow(QWidget):
if self._can_notify_user(): if self._can_notify_user():
util.notify_user('{} ({}) {}'.format(pkgv.model.name, pkgv.model.get_type(), self.i18n['uninstalled'])) util.notify_user('{} ({}) {}'.format(pkgv.model.name, pkgv.model.get_type(), self.i18n['uninstalled']))
self.refresh_apps(pkg_types={pkgv.model.__class__}) self.refresh_apps(pkg_types={pkgv.model.__class__} if len(self.pkgs) > 1 else None)
else: else:
if self._can_notify_user(): if self._can_notify_user():
util.notify_user('{}: {}'.format(pkgv.model.name, self.i18n['notification.uninstall.failed'])) util.notify_user('{}: {}'.format(pkgv.model.name, self.i18n['notification.uninstall.failed']))