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

@ -1,4 +1,5 @@
import { addObservablesTo, koArrayWithDestroy } from 'External/ko';
import { baseCollator } from 'Common/Translator';
import Remote from 'Remote/User/Fetch';
export const SMimeUserStore = koArrayWithDestroy();
@ -12,7 +13,7 @@ SMimeUserStore.loadCertificates = () => {
SMimeUserStore.loading(true);
Remote.request('SMimeGetCertificates', (iError, oData) => {
SMimeUserStore.loading(false);
const collator = new Intl.Collator(undefined, {sensitivity: 'base'});
const collator = baseCollator();
iError || SMimeUserStore(oData.Result.sort(
(a, b) => collator.compare(a.emailAddress, b.emailAddress) || (b.validTo_time_t - a.validTo_time_t)
));