Merge pull request #1509 from thelounge/astorije/fix-expand-preview

Fix `/expand` command also expanding condensed status messages
This commit is contained in:
Jérémie Astori 2017-09-09 10:47:57 -04:00 committed by GitHub
commit 9d7d5a110c
2 changed files with 3 additions and 3 deletions

View File

@ -201,12 +201,12 @@ $(function() {
} }
if (text.indexOf("/collapse") === 0) { if (text.indexOf("/collapse") === 0) {
$(".chan.active .toggle-button.opened").click(); $(".chan.active .toggle-preview.opened").click();
return; return;
} }
if (text.indexOf("/expand") === 0) { if (text.indexOf("/expand") === 0) {
$(".chan.active .toggle-button:not(.opened)").click(); $(".chan.active .toggle-preview:not(.opened)").click();
return; return;
} }

View File

@ -1,5 +1,5 @@
{{#preview}} {{#preview}}
<button class="toggle-button {{#if shown}} opened{{/if}}" <button class="toggle-button toggle-preview {{#if shown}} opened{{/if}}"
data-url="{{link}}" data-url="{{link}}"
{{#equal type "image"}} {{#equal type "image"}}
aria-label="Toggle image preview" aria-label="Toggle image preview"