Merge pull request #2027 from thelounge/xpaw/fix-auto-open-media
Fix auto-open media option not working
This commit is contained in:
commit
e5fa6e32f9
@ -15,6 +15,8 @@ function renderPreview(preview, msg) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preview.shown = preview.shown && options.shouldOpenMessagePreview(preview.type);
|
||||||
|
|
||||||
const template = $(templates.msg_preview({preview: preview}));
|
const template = $(templates.msg_preview({preview: preview}));
|
||||||
const image = template.find("img:first");
|
const image = template.find("img:first");
|
||||||
|
|
||||||
@ -40,8 +42,6 @@ function appendPreview(preview, msg, template) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
preview.shown = preview.shown && options.shouldOpenMessagePreview(preview.type);
|
|
||||||
|
|
||||||
const container = msg.closest(".messages");
|
const container = msg.closest(".messages");
|
||||||
const channelId = container.closest(".chan").data("id") || -1;
|
const channelId = container.closest(".chan").data("id") || -1;
|
||||||
const activeChannelId = chat.find(".chan.active").data("id") || -2;
|
const activeChannelId = chat.find(".chan.active").data("id") || -2;
|
||||||
|
Loading…
Reference in New Issue
Block a user