mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Tune emoji search
This commit is contained in:
committed by
Scott Nonnenberg
parent
3a46f4c9a2
commit
f4cb1194c6
@@ -131,15 +131,15 @@ export function getSheetCoordinates(
|
||||
const fuse = new Fuse(data, {
|
||||
shouldSort: true,
|
||||
threshold: 0.3,
|
||||
location: 0,
|
||||
distance: 5,
|
||||
maxPatternLength: 20,
|
||||
location: 4,
|
||||
distance: 10,
|
||||
maxPatternLength: 32,
|
||||
minMatchCharLength: 1,
|
||||
keys: ['name', 'short_name', 'short_names'],
|
||||
});
|
||||
|
||||
export function search(query: string) {
|
||||
return fuse.search(query);
|
||||
return fuse.search(query.substr(0, 32));
|
||||
}
|
||||
|
||||
const shortNames = new Set([
|
||||
|
||||
Reference in New Issue
Block a user