stream-chat-angular 3.2.0 → 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 +13 -5
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel-preview/channel-preview.component.js +3 -3
- package/esm2015/lib/channel.service.js +7 -3
- package/esm2015/lib/message-input/message-input.component.js +5 -1
- package/fesm2015/stream-chat-angular.js +13 -5
- 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
|
});
|
|
@@ -3217,6 +3221,10 @@
|
|
|
3217
3221
|
configurable: true
|
|
3218
3222
|
});
|
|
3219
3223
|
MessageInputComponent.prototype.initTextarea = function () {
|
|
3224
|
+
// cleanup previously built textarea
|
|
3225
|
+
if (!this.canSendMessages) {
|
|
3226
|
+
this.textareaRef = undefined;
|
|
3227
|
+
}
|
|
3220
3228
|
if (!this.canSendMessages || this.textareaRef || !this.textareaAnchor) {
|
|
3221
3229
|
return;
|
|
3222
3230
|
}
|
|
@@ -3855,7 +3863,7 @@
|
|
|
3855
3863
|
this.chatClientService = chatClientService;
|
|
3856
3864
|
this.isActive = false;
|
|
3857
3865
|
this.isUnread = false;
|
|
3858
|
-
this.latestMessage = 'Nothing yet...';
|
|
3866
|
+
this.latestMessage = 'streamChat.Nothing yet...';
|
|
3859
3867
|
this.subscriptions = [];
|
|
3860
3868
|
this.canSendReadEvents = true;
|
|
3861
3869
|
}
|
|
@@ -3924,7 +3932,7 @@
|
|
|
3924
3932
|
this.ngZone.run(function () {
|
|
3925
3933
|
var _a, _b, _c;
|
|
3926
3934
|
if (((_a = _this.channel) === null || _a === void 0 ? void 0 : _a.state.messages.length) === 0) {
|
|
3927
|
-
_this.latestMessage = 'Nothing yet...';
|
|
3935
|
+
_this.latestMessage = 'streamChat.Nothing yet...';
|
|
3928
3936
|
return;
|
|
3929
3937
|
}
|
|
3930
3938
|
if (!event.message ||
|