stream-chat-angular 4.68.3 → 4.68.4

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.
@@ -1 +1 @@
1
- export declare const version = "4.68.3";
1
+ export declare const version = "4.68.4";
@@ -356,7 +356,7 @@
356
356
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
357
357
  }
358
358
 
359
- var version = '4.68.3';
359
+ var version = '4.68.4';
360
360
 
361
361
  /**
362
362
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -907,11 +907,10 @@
907
907
  this.areReadEventsPaused = false;
908
908
  var readState = channel.state.read[((_a = this.chatClientService.chatClient.user) === null || _a === void 0 ? void 0 : _a.id) || ''];
909
909
  this.activeChannelLastReadMessageId = readState === null || readState === void 0 ? void 0 : readState.last_read_message_id;
910
- this.activeChannelUnreadCount = (readState === null || readState === void 0 ? void 0 : readState.unread_messages) || 0;
911
- if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId ||
912
- this.activeChannelUnreadCount === 0) {
910
+ if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId) {
913
911
  this.activeChannelLastReadMessageId = undefined;
914
912
  }
913
+ this.activeChannelUnreadCount = (readState === null || readState === void 0 ? void 0 : readState.unread_messages) || 0;
915
914
  this.watchForActiveChannelEvents(channel);
916
915
  this.addChannel(channel);
917
916
  this.activeChannelSubject.next(channel);
@@ -1880,9 +1879,6 @@
1880
1879
  _this.ngZone.run(function () {
1881
1880
  _this.activeChannelLastReadMessageId = e.last_read_message_id;
1882
1881
  _this.activeChannelUnreadCount = e.unread_messages;
1883
- if (_this.activeChannelUnreadCount === 0) {
1884
- _this.activeChannelLastReadMessageId = undefined;
1885
- }
1886
1882
  _this.activeChannelSubject.next(_this.activeChannel);
1887
1883
  });
1888
1884
  }));
@@ -2480,8 +2476,7 @@
2480
2476
  if (isThrottled === void 0) { isThrottled = true; }
2481
2477
  if (this.canSendReadEvents &&
2482
2478
  this.shouldMarkActiveChannelAsRead &&
2483
- !this.areReadEventsPaused &&
2484
- channel.countUnread() > 0) {
2479
+ !this.areReadEventsPaused) {
2485
2480
  if (isThrottled) {
2486
2481
  this.markReadThrottled(channel);
2487
2482
  }