mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 05:50:22 +00:00
Fix handling preview More buttons on inactive channels
This commit is contained in:
parent
527cac4c75
commit
5bff07f6f6
1 changed files with 3 additions and 2 deletions
|
@ -59,7 +59,8 @@ function appendPreview(preview, msg, template) {
|
|||
}
|
||||
|
||||
const container = msg.closest(".chat");
|
||||
const channelId = container.closest(".chan").data("id") || -1;
|
||||
const channel = container.closest(".chan");
|
||||
const channelId = channel.data("id") || -1;
|
||||
const activeChannelId = chat.find(".chan.active").data("id") || -2;
|
||||
|
||||
msg.find(`.text a[href="${escapedLink}"]`)
|
||||
|
@ -72,7 +73,7 @@ function appendPreview(preview, msg, template) {
|
|||
const previewContent = previewContainer.find(".toggle-content")[0];
|
||||
|
||||
const showMoreIfNeeded = () => {
|
||||
if (preview.type === "link") {
|
||||
if (preview.type === "link" && channel.hasClass("active")) {
|
||||
const isVisible = moreBtn.is(":visible");
|
||||
const shouldShow = previewContent.offsetWidth >= previewContainer[0].offsetWidth;
|
||||
|
||||
|
|
Loading…
Reference in a new issue