mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 00:24:15 +02:00
[fix][ui] not displaying some priority search results at the top of the table when filtering by name
This commit is contained in:
@@ -692,9 +692,9 @@ class ManageWindow(QWidget):
|
|||||||
setattr(self, attr, checked)
|
setattr(self, attr, checked)
|
||||||
checkbox.blockSignals(False)
|
checkbox.blockSignals(False)
|
||||||
|
|
||||||
def _gen_filters(self, updates: int = 0, ignore_updates: bool = False, only_apps: bool = None) -> dict:
|
def _gen_filters(self, updates: int = 0, ignore_updates: bool = False) -> dict:
|
||||||
return {
|
return {
|
||||||
'only_apps': self.filter_only_apps if only_apps is None else only_apps,
|
'only_apps': False if self.search_performed else self.filter_only_apps,
|
||||||
'type': self.type_filter,
|
'type': self.type_filter,
|
||||||
'category': self.category_filter,
|
'category': self.category_filter,
|
||||||
'updates': False if ignore_updates else self.filter_updates,
|
'updates': False if ignore_updates else self.filter_updates,
|
||||||
@@ -774,9 +774,7 @@ class ManageWindow(QWidget):
|
|||||||
|
|
||||||
def _apply_filters(self, pkgs_info: dict, ignore_updates: bool):
|
def _apply_filters(self, pkgs_info: dict, ignore_updates: bool):
|
||||||
pkgs_info['pkgs_displayed'] = []
|
pkgs_info['pkgs_displayed'] = []
|
||||||
filters = self._gen_filters(updates=pkgs_info['updates'],
|
filters = self._gen_filters(updates=pkgs_info['updates'], ignore_updates=ignore_updates)
|
||||||
ignore_updates=ignore_updates,
|
|
||||||
only_apps=False if self.search_performed else None)
|
|
||||||
for pkgv in pkgs_info['pkgs']:
|
for pkgv in pkgs_info['pkgs']:
|
||||||
commons.apply_filters(pkgv, filters, pkgs_info)
|
commons.apply_filters(pkgv, filters, pkgs_info)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user