mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 01:28:56 +08: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);
|
||||
Remote.request('SMimeGetCertificates', (iError, oData) => {
|
||||
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…
Reference in a new issue