Skip to content

Commit

Permalink
[FIX] Enabling "Collapse Embedded Media by Default" hides replies, qu…
Browse files Browse the repository at this point in the history
…otes (#10427)

[FIX] Enabling `Collapse Embedded Media by Default` was hiding replies and quotes
  • Loading branch information
c0dzilla authored and rodrigok committed May 18, 2018
1 parent 89ff78a commit e358a3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
{{/unless}}

{{#if image_url}}
{{#unless collapsed}}
{{#unless mediaCollapsed}}
<div class="attachment-image">
{{#if loadImage}}
<figure>
Expand Down Expand Up @@ -91,7 +91,7 @@
{{/if}}

{{#if audio_url}}
{{#unless collapsed}}
{{#unless mediaCollapsed}}
<div class="attachment-audio">
<audio controls>
<source src="{{fixCordova audio_url}}" type="{{audio_type}}" data-description="{{description}}">
Expand All @@ -102,7 +102,7 @@
{{/if}}

{{#if video_url}}
{{#unless collapsed}}
{{#unless mediaCollapsed}}
<div class="attachment-video">
<video controls class="inline-video">
<source src="{{fixCordova video_url}}" type="{{video_type}}" data-description="{{description}}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ Template.messageAttachment.helpers({
return colors[this.color] || this.color;
},
collapsed() {
if (this.collapsed != null) {
return this.collapsed;
}
return false;
},
mediaCollapsed() {
if (this.collapsed != null) {
return this.collapsed;
} else {
Expand Down

0 comments on commit e358a3c

Please sign in to comment.