From f249699d0b8b9c45987c78381aee7e6eef5cabab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 3 Feb 2026 14:14:08 -0500 Subject: [PATCH] fix: if there is no hr create one happens if its the only chat or if its the last one in the list --- public/src/client/chats.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/src/client/chats.js b/public/src/client/chats.js index 9371914c1a..338ba78c55 100644 --- a/public/src/client/chats.js +++ b/public/src/client/chats.js @@ -670,9 +670,11 @@ define('forum/chats', [ function moveChatAndHrToTop(roomEl) { const hr = roomEl.next('hr'); - components.get('chat/recent').prepend(roomEl); - if (hr.length) { - roomEl.after(hr); + const recentChats = components.get('chat/recent'); + const chatCount = recentChats.find('[data-roomid]').length; + recentChats.prepend(roomEl); + if (hr.length || chatCount > 1) { + roomEl.after(hr.length ? hr : `
`); } }