mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
[fix][ui] displaying empty categories
This commit is contained in:
@@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- Web
|
- Web
|
||||||
- handling unexpected connection errors
|
- handling unexpected connection errors
|
||||||
- handling web page fetch errors
|
- handling web page fetch errors
|
||||||
|
- UI
|
||||||
|
- displaying empty categories
|
||||||
|
|
||||||
## [0.9.5] 2020-06-07
|
## [0.9.5] 2020-06-07
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -32,7 +32,10 @@ def update_info(pkgv: PackageView, pkgs_info: dict):
|
|||||||
|
|
||||||
if pkgv.model.categories:
|
if pkgv.model.categories:
|
||||||
for c in pkgv.model.categories:
|
for c in pkgv.model.categories:
|
||||||
pkgs_info['categories'].add(c.lower())
|
if c:
|
||||||
|
cat = c.lower().strip()
|
||||||
|
if cat:
|
||||||
|
pkgs_info['categories'].add(cat)
|
||||||
|
|
||||||
pkgs_info['pkgs'].append(pkgv)
|
pkgs_info['pkgs'].append(pkgv)
|
||||||
pkgs_info['not_installed'] += 1 if not pkgv.model.installed else 0
|
pkgs_info['not_installed'] += 1 if not pkgv.model.installed else 0
|
||||||
|
|||||||
@@ -559,7 +559,10 @@ class ManageWindow(QWidget):
|
|||||||
for p in self.pkgs_available:
|
for p in self.pkgs_available:
|
||||||
if p.model.categories:
|
if p.model.categories:
|
||||||
for c in p.model.categories:
|
for c in p.model.categories:
|
||||||
categories.add(c.lower())
|
if c:
|
||||||
|
cat = c.strip().lower()
|
||||||
|
if cat:
|
||||||
|
categories.add(cat)
|
||||||
|
|
||||||
if categories:
|
if categories:
|
||||||
self._update_categories(categories, keep_selected=True)
|
self._update_categories(categories, keep_selected=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user