stream-chat-angular 5.1.2 → 5.1.3
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/esm2020/assets/version.mjs +2 -2
- package/esm2020/lib/channel.service.mjs +4 -9
- package/fesm2015/stream-chat-angular.mjs +4 -9
- package/fesm2015/stream-chat-angular.mjs.map +1 -1
- package/fesm2020/stream-chat-angular.mjs +4 -9
- package/fesm2020/stream-chat-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/version.ts +1 -1
|
@@ -20,7 +20,7 @@ import transliterate from '@stream-io/transliterate';
|
|
|
20
20
|
import * as i8$1 from 'angular-mentions';
|
|
21
21
|
import { MentionModule } from 'angular-mentions';
|
|
22
22
|
|
|
23
|
-
const version = '5.1.
|
|
23
|
+
const version = '5.1.3';
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](../components/NotificationListComponent.mdx) component displays the currently active notifications.
|
|
@@ -603,11 +603,10 @@ class ChannelService {
|
|
|
603
603
|
this.areReadEventsPaused = false;
|
|
604
604
|
const readState = channel.state.read[((_a = this.chatClientService.chatClient.user) === null || _a === void 0 ? void 0 : _a.id) || ''];
|
|
605
605
|
this.activeChannelLastReadMessageId = readState === null || readState === void 0 ? void 0 : readState.last_read_message_id;
|
|
606
|
-
|
|
607
|
-
if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId ||
|
|
608
|
-
this.activeChannelUnreadCount === 0) {
|
|
606
|
+
if (((_b = channel.state.latestMessages[channel.state.latestMessages.length - 1]) === null || _b === void 0 ? void 0 : _b.id) === this.activeChannelLastReadMessageId) {
|
|
609
607
|
this.activeChannelLastReadMessageId = undefined;
|
|
610
608
|
}
|
|
609
|
+
this.activeChannelUnreadCount = (readState === null || readState === void 0 ? void 0 : readState.unread_messages) || 0;
|
|
611
610
|
this.watchForActiveChannelEvents(channel);
|
|
612
611
|
this.addChannel(channel);
|
|
613
612
|
this.activeChannelSubject.next(channel);
|
|
@@ -1410,9 +1409,6 @@ class ChannelService {
|
|
|
1410
1409
|
this.ngZone.run(() => {
|
|
1411
1410
|
this.activeChannelLastReadMessageId = e.last_read_message_id;
|
|
1412
1411
|
this.activeChannelUnreadCount = e.unread_messages;
|
|
1413
|
-
if (this.activeChannelUnreadCount === 0) {
|
|
1414
|
-
this.activeChannelLastReadMessageId = undefined;
|
|
1415
|
-
}
|
|
1416
1412
|
this.activeChannelSubject.next(this.activeChannel);
|
|
1417
1413
|
});
|
|
1418
1414
|
}));
|
|
@@ -1917,8 +1913,7 @@ class ChannelService {
|
|
|
1917
1913
|
markRead(channel, isThrottled = true) {
|
|
1918
1914
|
if (this.canSendReadEvents &&
|
|
1919
1915
|
this.shouldMarkActiveChannelAsRead &&
|
|
1920
|
-
!this.areReadEventsPaused
|
|
1921
|
-
channel.countUnread() > 0) {
|
|
1916
|
+
!this.areReadEventsPaused) {
|
|
1922
1917
|
if (isThrottled) {
|
|
1923
1918
|
this.markReadThrottled(channel);
|
|
1924
1919
|
}
|