[ui] small refactoring

This commit is contained in:
Vinicius Moreira
2020-06-03 18:13:26 -03:00
parent d1fcb19e6e
commit 9dcfa89e24
3 changed files with 5 additions and 8 deletions

View File

@@ -254,14 +254,12 @@ class AppsTable(QTableWidget):
self.window.manager.cache_to_disk(pkg=app.model, icon_bytes=icon_data['bytes'], only_icon=True)
def update_packages(self, pkgs: List[PackageView], update_check_enabled: bool = True):
self.setRowCount(0) # removes the overwrite effect when updates the table
self.setRowCount(0) # removes the overwrite effect when updates the table
self.setEnabled(True)
if pkgs:
self.setRowCount(len(pkgs))
self.setEnabled(True)
if pkgs:
for idx, pkg in enumerate(pkgs):
pkg.table_index = idx