Fix /expand command also expanding condensed status messages

This commit is contained in:
Jérémie Astori 2017-09-07 19:50:00 -04:00
parent 3b049f174c
commit d82f4007ec
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8
2 changed files with 3 additions and 3 deletions

View file

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

View file

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