Remove diacritics from fuse.js search term
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
6abfbd286e
commit
c9296a9bbc
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import { WEEK } from './durations';
|
|||
import { fuseGetFnRemoveDiacritics, getCachedFuseIndex } from './fuse';
|
||||
import { countConversationUnreadStats, hasUnread } from './countUnreadStats';
|
||||
import { getE164 } from './getE164';
|
||||
import { removeDiacritics } from './removeDiacritics';
|
||||
|
||||
// Fuse.js scores have order of 0.01
|
||||
const ACTIVE_AT_SCORE_FACTOR = (1 / WEEK) * 0.01;
|
||||
|
@ -116,7 +117,7 @@ function searchConversations(
|
|||
});
|
||||
|
||||
// Escape the search term
|
||||
let extendedSearchTerm = searchTerm;
|
||||
let extendedSearchTerm = removeDiacritics(searchTerm);
|
||||
|
||||
// OR phoneNumber
|
||||
if (phoneNumber) {
|
||||
|
|
Loading…
Add table
Reference in a new issue