Skip to content

Commit

Permalink
更新 entry_search.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
jhqwqmc committed Aug 25, 2024
1 parent 7efc282 commit 4c862bc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/lib/widgets/components/app/entry_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ Fuzzy<EntryDefinition> _fuzzyEntries(_FuzzyEntriesRef ref) {
blueprint: blueprint,
entry: entry,
);
}).where((element) => true);
}).toList();
}).where((element) => element != null).toList();
}).toList().cast<EntryDefinition>();

return Fuzzy(
definitions,
Expand All @@ -105,11 +105,7 @@ Fuzzy<EntryDefinition> _fuzzyEntries(_FuzzyEntriesRef ref) {
.map((e) => e.score)
.sum
.compareTo(b.matches.map((e) => e.score).sum),
// tokenize: true,
// verbose: true,
keys: [
// The names of entries are like "test.some_entry".
// We want to give the last part more priority since it is more specific.
WeightedKey(
name: "name-suffix",
getter: (definition) => definition.entry.name.split(".").last,
Expand Down

0 comments on commit 4c862bc

Please sign in to comment.