@social-mail/social-mail-client 1.2.729 → 1.2.730

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43490,10 +43490,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
43490
43490
  const [mailboxes, channels, drives, websites] = yield Promise.all([ms.top(), ms.top({
43491
43491
  isChannel: true
43492
43492
  }), fs.top(), fs.topSites()]);
43493
- this.mailboxes.addAll(mailboxes);
43494
- this.channels.addAll(channels);
43495
- this.drives.addAll(drives);
43496
- this.websites.addAll(websites);
43493
+ this.add(this.mailboxes, ...mailboxes);
43494
+ this.add(this.channels, ...channels);
43495
+ this.add(this.drives, ...drives);
43496
+ this.add(this.websites, ...websites);
43497
43497
  });
43498
43498
  }
43499
43499
  addMailbox(mb) {
@@ -43508,16 +43508,18 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
43508
43508
  addChannel(mb) {
43509
43509
  this.add(this.mailboxes, mb);
43510
43510
  }
43511
- add(list, item) {
43512
- const model = modelEntitySchemas[item.$type];
43513
- const {
43514
- keys
43515
- } = model.schema;
43516
- if (list.some(m => keys.every(k => m[k.name] === item[k.name]))) {
43517
- return;
43511
+ add(list, ...items) {
43512
+ for (const item of items) {
43513
+ const model = modelEntitySchemas[item.$type];
43514
+ const {
43515
+ keys
43516
+ } = model.schema;
43517
+ if (list.some(m => keys.every(k => m[k.name] === item[k.name]))) {
43518
+ return;
43519
+ }
43520
+ item[canMenuBeClosed] = true;
43521
+ list.insert(0, item);
43518
43522
  }
43519
- item[canMenuBeClosed] = true;
43520
- list.insert(0, item);
43521
43523
  }
43522
43524
  };
43523
43525
  __decorate([Inject, __metadata("design:type", EntityService)], MenuService.prototype, "entityService", void 0);