Increased the distance to support contacts that may have even longer titles
This commit is contained in:
parent
a160fb7963
commit
3991b06256
|
@ -29,7 +29,7 @@ describe('filterAndSortConversationsByRecent', () => {
|
||||||
activeAt: 2,
|
activeAt: 2,
|
||||||
}),
|
}),
|
||||||
getDefaultConversation({
|
getDefaultConversation({
|
||||||
title: 'A long title ending with burrito',
|
title: 'A long long long title ending with burrito',
|
||||||
}),
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ describe('filterAndSortConversationsByRecent', () => {
|
||||||
'Boxing Club',
|
'Boxing Club',
|
||||||
'Abraham Lincoln',
|
'Abraham Lincoln',
|
||||||
'Not recent',
|
'Not recent',
|
||||||
'A long title ending with burrito',
|
'A long long long title ending with burrito',
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -55,6 +55,6 @@ describe('filterAndSortConversationsByRecent', () => {
|
||||||
'burrito',
|
'burrito',
|
||||||
'US'
|
'US'
|
||||||
).map(convo => convo.title);
|
).map(convo => convo.title);
|
||||||
assert.deepEqual(titles, ['A long title ending with burrito']);
|
assert.deepEqual(titles, ['A long long long title ending with burrito']);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -20,8 +20,8 @@ const FUSE_OPTIONS: Fuse.IFuseOptions<ConversationType> = {
|
||||||
// We sort manually anyway
|
// We sort manually anyway
|
||||||
shouldSort: true,
|
shouldSort: true,
|
||||||
// the default of 100 is not enough to catch a word at the end of a convo/group title
|
// the default of 100 is not enough to catch a word at the end of a convo/group title
|
||||||
// 150 is about right
|
// 200 is about right (contact names can get longer than the max for group titles)
|
||||||
distance: 150,
|
distance: 200,
|
||||||
keys: [
|
keys: [
|
||||||
{
|
{
|
||||||
name: 'searchableTitle',
|
name: 'searchableTitle',
|
||||||
|
|
Loading…
Reference in New Issue