FuzzySort: replaced JS helper by a proper component so it can be used from plugins without any wrapper.

This commit is contained in:
Lemmy
2026-01-10 00:24:37 -05:00
parent 8ad19e0a4f
commit 8636e5be1d
10 changed files with 738 additions and 693 deletions
+2 -3
View File
@@ -1,7 +1,6 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import "../Helpers/FuzzySort.js" as Fuzzysort
import qs.Commons
import qs.Widgets
@@ -131,8 +130,8 @@ RowLayout {
}
// Use fuzzy search if available, fallback to simple search
if (typeof Fuzzysort !== 'undefined') {
var fuzzyResults = Fuzzysort.go(query, items, {
if (typeof FuzzySort !== 'undefined') {
var fuzzyResults = FuzzySort.go(query, items, {
"key": "name",
"threshold": -1000,
"limit": 50