mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
Revert "DEV: rework the chat-live-pane" (#20510)
This reverts commit 67c0498f6475f56472308d25441ea2a817dd1891.
This commit is contained in:
@ -42,14 +42,6 @@ export default class ChatChannelsManager extends Service {
|
||||
this.#cache(model);
|
||||
}
|
||||
|
||||
if (
|
||||
channelObject.meta?.message_bus_last_ids?.channel_message_bus_last_id !==
|
||||
undefined
|
||||
) {
|
||||
model.channelMessageBusLastId =
|
||||
channelObject.meta.message_bus_last_ids.channel_message_bus_last_id;
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@ -146,7 +138,8 @@ export default class ChatChannelsManager extends Service {
|
||||
const unreadCountA = a.currentUserMembership.unread_count || 0;
|
||||
const unreadCountB = b.currentUserMembership.unread_count || 0;
|
||||
if (unreadCountA === unreadCountB) {
|
||||
return new Date(a.lastMessageSentAt) > new Date(b.lastMessageSentAt)
|
||||
return new Date(a.get("last_message_sent_at")) >
|
||||
new Date(b.get("last_message_sent_at"))
|
||||
? -1
|
||||
: 1;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user