stream-chat-angular 4.28.0 → 4.29.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 +15 -1
- package/bundles/stream-chat-angular.umd.js.map +1 -1
- package/esm2015/assets/version.js +2 -2
- package/esm2015/lib/channel.service.js +15 -1
- package/fesm2015/stream-chat-angular.js +15 -1
- package/fesm2015/stream-chat-angular.js.map +1 -1
- package/lib/channel.service.d.ts +8 -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 = "4.
|
|
1
|
+
export declare const version = "4.29.0";
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
var version = '4.
|
|
358
|
+
var version = '4.29.0';
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -797,6 +797,8 @@
|
|
|
797
797
|
});
|
|
798
798
|
/**
|
|
799
799
|
* Sets the given `channel` as active and marks it as read.
|
|
800
|
+
* If the channel wasn't previously part of the channel, it will be added to the beginning of the list.
|
|
801
|
+
*
|
|
800
802
|
* @param channel
|
|
801
803
|
*/
|
|
802
804
|
ChannelService.prototype.setAsActiveChannel = function (channel) {
|
|
@@ -804,6 +806,7 @@
|
|
|
804
806
|
var prevActiveChannel = this.activeChannelSubject.getValue();
|
|
805
807
|
this.stopWatchForActiveChannelEvents(prevActiveChannel);
|
|
806
808
|
this.watchForActiveChannelEvents(channel);
|
|
809
|
+
this.addChannel(channel);
|
|
807
810
|
this.activeChannelSubject.next(channel);
|
|
808
811
|
channel.state.messages.forEach(function (m) {
|
|
809
812
|
m.readBy = getReadBy(m, channel);
|
|
@@ -1311,6 +1314,17 @@
|
|
|
1311
1314
|
ChannelService.prototype.selectMessageToQuote = function (message) {
|
|
1312
1315
|
this.messageToQuoteSubject.next(message);
|
|
1313
1316
|
};
|
|
1317
|
+
/**
|
|
1318
|
+
* Add a new channel to the channel list
|
|
1319
|
+
* The channel will be added to the beginning of the channel list
|
|
1320
|
+
* @param channel
|
|
1321
|
+
*/
|
|
1322
|
+
ChannelService.prototype.addChannel = function (channel) {
|
|
1323
|
+
if (!this.channels.find(function (c) { return c.cid === channel.cid; })) {
|
|
1324
|
+
this.channelsSubject.next(__spreadArray([channel], __read(this.channels)));
|
|
1325
|
+
this.watchForChannelEvents(channel);
|
|
1326
|
+
}
|
|
1327
|
+
};
|
|
1314
1328
|
ChannelService.prototype.sendMessageRequest = function (preview, customData) {
|
|
1315
1329
|
var _a;
|
|
1316
1330
|
return __awaiter(this, void 0, void 0, function () {
|