mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[improvement][ui] name filter now compares the typed word with the beginning of the package name
This commit is contained in:
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.9.6] 2020
|
||||
### Improvements
|
||||
- UI
|
||||
- name filter now compares the typed word with the beginning of the package name
|
||||
### Fixes
|
||||
- Web
|
||||
- handling unexpected connection errors
|
||||
|
||||
@@ -51,7 +51,7 @@ def apply_filters(pkgv: PackageView, filters: dict, info: dict):
|
||||
hidden = not pkgv.model.categories or not [c for c in pkgv.model.categories if c.lower() == filters['category']]
|
||||
|
||||
if not hidden and filters['name']:
|
||||
hidden = filters['name'] not in pkgv.model.name.lower()
|
||||
hidden = not pkgv.model.name.lower().startswith(filters['name'])
|
||||
|
||||
if not hidden and (not filters['display_limit'] or len(info['pkgs_displayed']) < filters['display_limit']):
|
||||
info['pkgs_displayed'].append(pkgv)
|
||||
|
||||
Reference in New Issue
Block a user