mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 12:04:16 +02:00
[fix][ui] not updating cached installed packages state after ignoring/reverting updates
This commit is contained in:
@@ -929,4 +929,4 @@ class IgnorePackageUpdates(AsyncAction):
|
||||
self.notify_finished(res)
|
||||
|
||||
finally:
|
||||
self.pkg = None
|
||||
self.pkg = None
|
||||
|
||||
@@ -28,3 +28,7 @@ class PackageView:
|
||||
|
||||
def __repr__(self):
|
||||
return '{} ( {} )'.format(self.model.name, self.get_type_label())
|
||||
|
||||
def __eq__(self, other):
|
||||
if isinstance(other, PackageView):
|
||||
return self.model == other.model
|
||||
|
||||
@@ -1277,6 +1277,12 @@ class ManageWindow(QWidget):
|
||||
if res['success']:
|
||||
self.apply_filters_async()
|
||||
|
||||
if self.pkgs_installed:
|
||||
cached_installed = [idx for idx, p in enumerate(self.pkgs_installed) if p == res['pkg']]
|
||||
|
||||
for idx in cached_installed:
|
||||
self.pkgs_installed[idx] = res['pkg']
|
||||
|
||||
dialog.show_message(title=self.i18n['success'].capitalize(),
|
||||
body=self.i18n['action.{}.success'.format(res['action'])].format(bold(res['pkg'].model.name)),
|
||||
type_=MessageType.INFO)
|
||||
|
||||
Reference in New Issue
Block a user