@sumaris-net/ngx-components 2.2.9 → 2.3.0

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.
@@ -21384,11 +21384,11 @@ class MenuComponent {
21384
21384
  .pipe(distinctUntilChanged())
21385
21385
  .subscribe((value) => value ? this.open() : this.close());
21386
21386
  // Update component when refresh is need (=login events or config changed)
21387
- let lastLoadedAccountUpdateDate;
21387
+ let lastAccountUpdateDate;
21388
21388
  this._subscription.add(merge(merge(this.accountService.onLogin
21389
21389
  .pipe(
21390
21390
  // Filter on account changes
21391
- filter(account => !DateUtils.isSame(account?.updateDate, lastLoadedAccountUpdateDate))), this.configService.config
21391
+ filter(account => !DateUtils.isSame(account?.updateDate, lastAccountUpdateDate))), this.configService.config
21392
21392
  .pipe(
21393
21393
  // Store the config
21394
21394
  tap(config => this._config = config)))
@@ -21401,10 +21401,11 @@ class MenuComponent {
21401
21401
  this.accountService.onLogout.pipe(mapTo(null)))
21402
21402
  .subscribe(account => {
21403
21403
  if (account?.updateDate) {
21404
- lastLoadedAccountUpdateDate = account.updateDate;
21404
+ lastAccountUpdateDate = account.updateDate;
21405
21405
  this.onLogin(account);
21406
21406
  }
21407
21407
  else {
21408
+ lastAccountUpdateDate = null;
21408
21409
  this.onLogout(true);
21409
21410
  }
21410
21411
  }));