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

@ -12,6 +12,8 @@ import { OpenPgpKeyPopupView } from 'View/Popup/OpenPgpKey';
import { Passphrases } from 'Storage/Passphrases';
import { baseCollator } from 'Common/Translator';
const
findGnuPGKey = (keys, query/*, sign*/) =>
keys.find(key =>
@ -106,7 +108,7 @@ export const GnuPGUserStore = new class {
key.view = () => key.fetch(() => showScreenPopup(OpenPgpKeyPopupView, [key]));
return key;
},
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.id, b.id)
);