mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 21:28:23 +00:00
Merge pull request #1746 from thelounge/xpaw/fix-preview-keep-to-bottom
Trigger keep to bottom for previews correctly
This commit is contained in:
commit
d9efaef369
1 changed files with 4 additions and 4 deletions
|
@ -29,12 +29,12 @@ function renderPreview(preview, msg) {
|
|||
|
||||
preview.shown = preview.shown && options.shouldOpenMessagePreview(preview.type);
|
||||
|
||||
const container = msg.closest(".chat");
|
||||
const channelId = container.data("id");
|
||||
const activeChannelId = chat.find(".chan.active").data("id");
|
||||
const container = msg.closest(".messages");
|
||||
const channelId = container.closest(".chan").data("id") || -1;
|
||||
const activeChannelId = chat.find(".chan.active").data("id") || -2;
|
||||
|
||||
let bottom = false;
|
||||
if (container.length && activeChannelId === channelId) {
|
||||
if (activeChannelId === channelId) {
|
||||
bottom = container.isScrollBottom();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue