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:
parent
6b3a68e562
commit
dbdc4bbbd6
|
@ -12,6 +12,7 @@ import ChatChannelRow from "./chat-channel-row";
|
||||||
|
|
||||||
export default class ChannelsListPublic extends Component {
|
export default class ChannelsListPublic extends Component {
|
||||||
@service chatChannelsManager;
|
@service chatChannelsManager;
|
||||||
|
@service chatTrackingStateManager;
|
||||||
@service site;
|
@service site;
|
||||||
@service siteSettings;
|
@service siteSettings;
|
||||||
@service currentUser;
|
@service currentUser;
|
||||||
|
@ -40,9 +41,7 @@ export default class ChannelsListPublic extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
get hasUnreadThreads() {
|
get hasUnreadThreads() {
|
||||||
return this.chatChannelsManager.publicMessageChannels.some(
|
return this.chatTrackingStateManager.hasUnreadThreads;
|
||||||
(channel) => channel.unreadThreadsCount > 0
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in New Issue