stream-chat-angular 3.2.2 → 3.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.
- package/assets/version.d.ts +1 -1
- package/bundles/stream-chat-angular.umd.js +7 -3
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +7 -3
- package/fesm2015/stream-chat-angular.js +7 -3
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +4 -0
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
package/assets/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.
|
|
1
|
+
export declare const version = "3.3.0";
|
|
@@ -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.
|
|
357
|
+
var version = '3.3.0';
|
|
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,6 +659,10 @@
|
|
|
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;
|
|
662
666
|
this.channelsSubject = new rxjs.BehaviorSubject(undefined);
|
|
663
667
|
this.activeChannelSubject = new rxjs.BehaviorSubject(undefined);
|
|
664
668
|
this.activeChannelMessagesSubject = new rxjs.BehaviorSubject([]);
|
|
@@ -739,7 +743,7 @@
|
|
|
739
743
|
channel.state.messages.forEach(function (m) {
|
|
740
744
|
m.readBy = getReadBy(m, channel);
|
|
741
745
|
});
|
|
742
|
-
if (this.canSendReadEvents) {
|
|
746
|
+
if (this.canSendReadEvents && this.shouldMarkActiveChannelAsRead) {
|
|
743
747
|
void channel.markRead();
|
|
744
748
|
}
|
|
745
749
|
this.activeChannelMessagesSubject.next(__spreadArray([], __read(channel.state.messages)));
|
|
@@ -1307,7 +1311,7 @@
|
|
|
1307
1311
|
? _this.activeThreadMessagesSubject.next(__spreadArray([], __read(channel.state.threads[event.message.parent_id])))
|
|
1308
1312
|
: _this.activeChannelMessagesSubject.next(__spreadArray([], __read(channel.state.messages)));
|
|
1309
1313
|
_this.activeChannel$.pipe(operators.first()).subscribe(function (c) {
|
|
1310
|
-
if (_this.canSendReadEvents) {
|
|
1314
|
+
if (_this.canSendReadEvents && _this.shouldMarkActiveChannelAsRead) {
|
|
1311
1315
|
void (c === null || c === void 0 ? void 0 : c.markRead());
|
|
1312
1316
|
}
|
|
1313
1317
|
});
|