mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Revamp array filtering
Replaced fakeMd5 with new Jua.randomId Cleanup more code
This commit is contained in:
parent
9992b20163
commit
c3a2da65df
23 changed files with 130 additions and 289 deletions
|
|
@ -13,7 +13,6 @@ import {
|
|||
import {
|
||||
delegateRunOnDestroy,
|
||||
computedPagenatorHelper,
|
||||
fakeMd5,
|
||||
pInt
|
||||
} from 'Common/Utils';
|
||||
|
||||
|
|
@ -154,7 +153,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
selected = this.currentContact();
|
||||
|
||||
return selected
|
||||
? checked.concat([selected]).filter((value, index, self) => self.indexOf(value) == index)
|
||||
? checked.concat([selected]).unique()
|
||||
: checked;
|
||||
});
|
||||
|
||||
|
|
@ -282,7 +281,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
this.viewSaving(true);
|
||||
this.viewSaveTrigger(SaveSettingsStep.Animate);
|
||||
|
||||
const requestUid = fakeMd5(),
|
||||
const requestUid = Jua.randomId(),
|
||||
properties = [];
|
||||
|
||||
this.viewProperties().forEach(oItem => {
|
||||
|
|
@ -579,7 +578,7 @@ class ContactsPopupView extends AbstractViewNext {
|
|||
return contact.parse(item) ? contact : null;
|
||||
});
|
||||
|
||||
list = list.filter(value => !!value);
|
||||
list = list.filter(v => v);
|
||||
|
||||
count = pInt(data.Result.Count);
|
||||
count = 0 < count ? count : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue