@sumaris-net/ngx-components 1.21.0-beta31 → 1.21.0-beta32

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.
@@ -31189,20 +31189,28 @@
31189
31189
  return __awaiter(this, void 0, void 0, function () {
31190
31190
  var _this = this;
31191
31191
  return __generator(this, function (_b) {
31192
- if (isNil(this.userEventService)) {
31193
- console.warn(this._logPrefix + "No service injected");
31194
- this.disabled = true;
31195
- return [2 /*return*/];
31192
+ switch (_b.label) {
31193
+ case 0:
31194
+ if (isNil(this.userEventService)) {
31195
+ console.warn(this._logPrefix + "No service injected");
31196
+ this.disabled = true;
31197
+ return [2 /*return*/];
31198
+ }
31199
+ // Wait service
31200
+ return [4 /*yield*/, this.userEventService.ready()];
31201
+ case 1:
31202
+ // Wait service
31203
+ _b.sent();
31204
+ // Subscribe to read event
31205
+ this._readEvent.subscribe(function (value) {
31206
+ // default: mark event as read
31207
+ _this.userEventService.markAsRead([value]);
31208
+ });
31209
+ this._readEvents.subscribe(function (value) {
31210
+ _this.userEventService.markAsRead(value);
31211
+ });
31212
+ return [2 /*return*/];
31196
31213
  }
31197
- // Subscribe to read event
31198
- this._readEvent.subscribe(function (value) {
31199
- // default: mark event as read
31200
- _this.userEventService.markAsRead([value]);
31201
- });
31202
- this._readEvents.subscribe(function (value) {
31203
- _this.userEventService.markAsRead(value);
31204
- });
31205
- return [2 /*return*/];
31206
31214
  });
31207
31215
  });
31208
31216
  };