mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-10 22:34:14 +02:00
[improvement][ui] not performing a full table refresh after installing a new package
This commit is contained in:
@@ -1211,7 +1211,23 @@ class ManageWindow(QWidget):
|
||||
if self._can_notify_user():
|
||||
util.notify_user(msg='{} ({}) {}'.format(res['pkg'].model.name, res['pkg'].model.get_type(), self.i18n['installed']))
|
||||
|
||||
self._finish_refresh_apps({'installed': [res['pkg'].model], 'total': 1, 'types': None})
|
||||
models_updated = []
|
||||
|
||||
for key in ('installed', 'removed'):
|
||||
if res.get(key):
|
||||
models_updated.extend(res[key])
|
||||
|
||||
if models_updated:
|
||||
view_to_update = []
|
||||
for displayed in self.pkgs:
|
||||
for p in models_updated:
|
||||
if displayed.model == p:
|
||||
displayed.model = p
|
||||
view_to_update.append(displayed)
|
||||
|
||||
for pkgv in view_to_update:
|
||||
self.table_apps.update_package(pkgv)
|
||||
|
||||
self.ref_bt_installed.setVisible(False)
|
||||
self.ref_checkbox_only_apps.setVisible(False)
|
||||
self.update_custom_actions()
|
||||
@@ -1324,3 +1340,4 @@ class ManageWindow(QWidget):
|
||||
body=self.i18n['action.{}.fail'.format(res['action'])].format(bold(res['pkg'].model.name)),
|
||||
type_=MessageType.ERROR)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user