@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.
@@ -40211,10 +40211,10 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
40211
40211
  const [mailboxes, channels, drives, websites] = yield Promise.all([ms.top(), ms.top({
40212
40212
  isChannel: true
40213
40213
  }), fs.top(), fs.topSites()]);
40214
- this.mailboxes.addAll(mailboxes);
40215
- this.channels.addAll(channels);
40216
- this.drives.addAll(drives);
40217
- this.websites.addAll(websites);
40214
+ this.add(this.mailboxes, ...mailboxes);
40215
+ this.add(this.channels, ...channels);
40216
+ this.add(this.drives, ...drives);
40217
+ this.add(this.websites, ...websites);
40218
40218
  });
40219
40219
  }
40220
40220
  addMailbox(mb) {
@@ -40229,16 +40229,18 @@ System.register(["tslib", "@web-atoms/core/dist/di/DISingleton", "@web-atoms/cor
40229
40229
  addChannel(mb) {
40230
40230
  this.add(this.mailboxes, mb);
40231
40231
  }
40232
- add(list, item) {
40233
- const model = modelEntitySchemas[item.$type];
40234
- const {
40235
- keys
40236
- } = model.schema;
40237
- if (list.some(m => keys.every(k => m[k.name] === item[k.name]))) {
40238
- return;
40232
+ add(list, ...items) {
40233
+ for (const item of items) {
40234
+ const model = modelEntitySchemas[item.$type];
40235
+ const {
40236
+ keys
40237
+ } = model.schema;
40238
+ if (list.some(m => keys.every(k => m[k.name] === item[k.name]))) {
40239
+ return;
40240
+ }
40241
+ item[canMenuBeClosed] = true;
40242
+ list.insert(0, item);
40239
40243
  }
40240
- item[canMenuBeClosed] = true;
40241
- list.insert(0, item);
40242
40244
  }
40243
40245
  };
40244
40246
  __decorate([Inject, __metadata("design:type", EntityService)], MenuService.prototype, "entityService", void 0);