mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Sort S/MIME certificates on emailAddress else validTo
This commit is contained in:
parent
091895df38
commit
20daa1ce13
1 changed files with 4 additions and 1 deletions
|
|
@ -12,6 +12,9 @@ SMimeUserStore.loadCertificates = () => {
|
||||||
SMimeUserStore.loading(true);
|
SMimeUserStore.loading(true);
|
||||||
Remote.request('SMimeGetCertificates', (iError, oData) => {
|
Remote.request('SMimeGetCertificates', (iError, oData) => {
|
||||||
SMimeUserStore.loading(false);
|
SMimeUserStore.loading(false);
|
||||||
iError || SMimeUserStore(oData.Result);
|
const collator = new Intl.Collator(undefined, {sensitivity: 'base'});
|
||||||
|
iError || SMimeUserStore(oData.Result.sort(
|
||||||
|
(a, b) => collator.compare(a.emailAddress, b.emailAddress) || (b.validTo_time_t - a.validTo_time_t)
|
||||||
|
));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue