DEV: use chat tracking state manager for unread threads (#25457)

Updates the channel list component to use the hasUnreadThreads from Chat Tracking State Manager service.
This commit is contained in:
David Battersby 2024-01-29 14:50:48 +08:00 committed by GitHub
parent 6b3a68e562
commit dbdc4bbbd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -12,6 +12,7 @@ import ChatChannelRow from "./chat-channel-row";
export default class ChannelsListPublic extends Component {
@service chatChannelsManager;
@service chatTrackingStateManager;
@service site;
@service siteSettings;
@service currentUser;
@ -40,9 +41,7 @@ export default class ChannelsListPublic extends Component {
}
get hasUnreadThreads() {
return this.chatChannelsManager.publicMessageChannels.some(
(channel) => channel.unreadThreadsCount > 0
);
return this.chatTrackingStateManager.hasUnreadThreads;
}
@action