nuxeo-development-framework 0.2.4 → 0.2.5

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.
@@ -15533,7 +15533,7 @@
15533
15533
  });
15534
15534
  }
15535
15535
  this.translationService.isArabic.subscribe(function (res) {
15536
- _this.reset();
15536
+ _this.resetNotifications();
15537
15537
  });
15538
15538
  }
15539
15539
  Object.defineProperty(NotificationsService.prototype, "notifications", {
@@ -15562,6 +15562,9 @@
15562
15562
  this._notifications = [];
15563
15563
  this._notificationsCount = 0;
15564
15564
  };
15565
+ NotificationsService.prototype.resetNotifications = function () {
15566
+ this._notifications = [];
15567
+ };
15565
15568
  NotificationsService.prototype.fetchNotifications = function () {
15566
15569
  var _this = this;
15567
15570
  return this.getNotifications(this.profile.id, {
@@ -15760,7 +15763,9 @@
15760
15763
  if (_this.stompClient) {
15761
15764
  _this.subscriber = _this.stompClient.subscribe("/user/topic/notification", function (data) {
15762
15765
  var notification = JSON.parse(data.body);
15763
- _this._notifications.unshift(notification);
15766
+ // this._notifications.unshift(notification);
15767
+ _this.resetNotifications();
15768
+ _this.fetchNotifications().subscribe(function () { });
15764
15769
  _this.getCount().subscribe(function () { });
15765
15770
  _this.listenerObserver.emit(notification);
15766
15771
  });
@@ -16018,6 +16023,7 @@
16018
16023
  */
16019
16024
  NotificationsButtonComponent.prototype.getNotifications = function () {
16020
16025
  var _this = this;
16026
+ this.notificationsService.resetNotifications();
16021
16027
  this.notificationsService.fetchNotifications().subscribe(function () {
16022
16028
  _this.notificationsService.resetCount();
16023
16029
  });