diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-11 19:16:05 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-14 15:37:02 +0800 |
| commit | b17ae550381232fd8c0cce5024e8ec0852918a33 (patch) | |
| tree | caad80336bcc1ff6c9a8f576cd7dfe3aa26db242 /components | |
| parent | 6a910bb63463facb7c5b72c2054740154934c7a4 (diff) | |
feat(shell): implement standalone function for dynamic component loading
feat(Searchable): add Include algorithm and update filtering logic
fix(Launcher): refactor state handling and improve selection logic
fix(Clip): update clipHist property initialization and selection state sync
refactor(IComponent): enhance state management and streamline properties
refactor(Clip): change algorithm to Include for improved search functionality
Diffstat (limited to 'components')
| -rw-r--r-- | components/Searchable.qml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/Searchable.qml b/components/Searchable.qml index 9501827..50e73fe 100644 --- a/components/Searchable.qml +++ b/components/Searchable.qml @@ -12,7 +12,8 @@ Singleton { enum SearchAlgorithm { Levendist, Fzf, - Fuzzysort + Fuzzysort, + Include } property int algorithm: Searchable.SearchAlgorithm.Levendist property int scoreThreshold: 50 @@ -224,6 +225,9 @@ Singleton { return out; } + if (algorithm === Searchable.SearchAlgorithm.Include) + return list.filter(item => keys.some(k => transformSearch(fieldString(item, k)).includes(search))); + return []; } } |
