@sumaris-net/ngx-components 1.21.0-beta21 → 1.21.0-beta22

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.
@@ -30306,6 +30306,8 @@
30306
30306
  }
30307
30307
  if (!filter)
30308
30308
  filter = this.defaultFilter();
30309
+ // Apply last reset date as start date
30310
+ filter.startDate = this.resetCountDate;
30309
30311
  filter = this.asFilter(filter);
30310
30312
  if (this._debug)
30311
30313
  console.debug(this._logPrefix + "Counting user events with filter:", filter);
@@ -30652,6 +30654,8 @@
30652
30654
  AbstractUserEventService.prototype.resetCount = function () {
30653
30655
  this.count$.next(undefined);
30654
30656
  this.resetCountDate = moment$6();
30657
+ // restart listening count changes
30658
+ this.startListenCountChanges();
30655
30659
  };
30656
30660
  /* -- protected methods -- */
30657
30661
  AbstractUserEventService.prototype.onLogin = function () {
@@ -30667,15 +30671,23 @@
30667
30671
  // Update count
30668
30672
  this.count$.next(count);
30669
30673
  // Then listen changes
30670
- this._listenSubscription = this.listenCountChanges(undefined).subscribe();
30674
+ this.startListenCountChanges();
30671
30675
  return [2 /*return*/];
30672
30676
  }
30673
30677
  });
30674
30678
  });
30675
30679
  };
30676
30680
  AbstractUserEventService.prototype.onLogout = function () {
30681
+ this.stopListenCountChanges();
30682
+ };
30683
+ AbstractUserEventService.prototype.startListenCountChanges = function () {
30684
+ this.stopListenCountChanges();
30685
+ this._listenSubscription = this.listenCountChanges(undefined).subscribe();
30686
+ };
30687
+ AbstractUserEventService.prototype.stopListenCountChanges = function () {
30677
30688
  var _a;
30678
30689
  (_a = this._listenSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
30690
+ this._listenSubscription = undefined;
30679
30691
  };
30680
30692
  AbstractUserEventService.prototype.processUserEvent = function (source, that) {
30681
30693
  var e_3, _b;