Replace all new Intl.Collator with new baseCollator

This commit is contained in:
the-djmaze 2024-03-19 15:24:34 +01:00
parent 70b1a93108
commit 7450afeecf
7 changed files with 17 additions and 9 deletions

View file

@ -13,6 +13,8 @@ import { OpenPgpKeyPopupView } from 'View/Popup/OpenPgpKey';
import { Passphrases } from 'Storage/Passphrases';
import { baseCollator } from 'Common/Translator';
const
findOpenPGPKey = (keys, query/*, sign*/) =>
keys.find(key =>
@ -39,7 +41,7 @@ const
}
},
collator = new Intl.Collator(undefined, {sensitivity: 'base'}),
collator = baseCollator(),
sort = keys => keys.sort(
// (a, b) => collator.compare(a.emails[0], b.emails[0]) || collator.compare(a.fingerprint, b.fingerprint)
(a, b) => collator.compare(a.emails[0], b.emails[0]) || collator.compare(a.id, b.id)