stream-chat-angular 3.3.0 → 3.3.1

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 = "3.3.0";
1
+ export declare const version = "3.3.1";
@@ -354,7 +354,7 @@
354
354
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
355
355
  }
356
356
 
357
- var version = '3.3.0';
357
+ var version = '3.3.1';
358
358
 
359
359
  /**
360
360
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
@@ -659,10 +659,6 @@
659
659
  var _this = this;
660
660
  this.chatClientService = chatClientService;
661
661
  this.ngZone = ngZone;
662
- /**
663
- * If set to false, read events won't be sent as new messages are received
664
- */
665
- this.shouldMarkActiveChannelAsRead = true;
666
662
  this.channelsSubject = new rxjs.BehaviorSubject(undefined);
667
663
  this.activeChannelSubject = new rxjs.BehaviorSubject(undefined);
668
664
  this.activeChannelMessagesSubject = new rxjs.BehaviorSubject([]);
@@ -675,6 +671,7 @@
675
671
  this.messageToQuoteSubject = new rxjs.BehaviorSubject(undefined);
676
672
  this.usersTypingInChannelSubject = new rxjs.BehaviorSubject([]);
677
673
  this.usersTypingInThreadSubject = new rxjs.BehaviorSubject([]);
674
+ this._shouldMarkActiveChannelAsRead = true;
678
675
  this.channelListSetter = function (channels) {
679
676
  var currentChannels = _this.channelsSubject.getValue() || [];
680
677
  var newChannels = channels.filter(function (c) { return !currentChannels.find(function (channel) { return channel.cid === c.cid; }); });
@@ -731,6 +728,26 @@
731
728
  this.latestMessageDateByUserByChannels$ =
732
729
  this.latestMessageDateByUserByChannelsSubject.asObservable();
733
730
  }
731
+ Object.defineProperty(ChannelService.prototype, "shouldMarkActiveChannelAsRead", {
732
+ /**
733
+ * If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
734
+ */
735
+ get: function () {
736
+ return this._shouldMarkActiveChannelAsRead;
737
+ },
738
+ /**
739
+ * If set to false, read events won't be sent as new messages are received. If set to true active channel (if any) will immediately be marked as read.
740
+ */
741
+ set: function (shouldMarkActiveChannelAsRead) {
742
+ var _a;
743
+ if (!this._shouldMarkActiveChannelAsRead && shouldMarkActiveChannelAsRead) {
744
+ (_a = this.activeChannelSubject.getValue()) === null || _a === void 0 ? void 0 : _a.markRead();
745
+ }
746
+ this._shouldMarkActiveChannelAsRead = shouldMarkActiveChannelAsRead;
747
+ },
748
+ enumerable: false,
749
+ configurable: true
750
+ });
734
751
  /**
735
752
  * Sets the given `channel` as active and marks it as read.
736
753
  * @param channel