[view] improvement: new 'installed' filter

This commit is contained in:
Vinicius Moreira
2022-03-11 12:40:12 -03:00
parent 508e9169c2
commit 36f0bf507a
12 changed files with 57 additions and 17 deletions

View File

@@ -61,7 +61,10 @@ def sum_updates_displayed(info: dict) -> int:
def is_package_hidden(pkg: PackageView, filters: dict) -> bool:
hidden = filters['only_apps'] and pkg.model.installed and not pkg.model.is_application()
hidden = filters['only_installed'] and not pkg.model.installed
if not hidden and filters['only_apps']:
hidden = pkg.model.installed and not pkg.model.is_application()
if not hidden and filters['updates']:
hidden = not pkg.model.update or pkg.model.is_update_ignored()