Revert "DEV: rework the chat-live-pane" (#20510)

This reverts commit 67c0498f6475f56472308d25441ea2a817dd1891.
This commit is contained in:
Joffrey JAFFEUX
2023-03-02 16:59:11 +01:00
committed by GitHub
parent e52bbc1230
commit 31480bde92
118 changed files with 2329 additions and 2590 deletions

View File

@ -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 {