Don't show media in notifications (#112)

Fixes #70
This commit is contained in:
Nolan Lawson 2018-04-14 14:18:19 -07:00 committed by GitHub
parent 47975d0fcc
commit 29c38c1f83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@
<StatusContent :isStatusInOwnThread :isStatusInNotification
:originalStatus :uuid shown="{{showContent}}"/>
{{/if}}
{{#if originalStatus.media_attachments && originalStatus.media_attachments.length}}
{{#if showMedia }}
<StatusMediaAttachments :originalStatus :uuid
on:recalculateHeight />
{{/if}}
@ -206,6 +206,11 @@
},
spoilerShown: ($spoilersShown, uuid) => !!$spoilersShown[uuid],
replyShown: ($repliesShown, uuid) => !!$repliesShown[uuid],
showMedia: (originalStatus, isStatusInNotification) => {
return !isStatusInNotification
&& originalStatus.media_attachments
&& originalStatus.media_attachments.length
},
ariaLabel: (originalAccount, originalStatus, visibility) => {
return (visibility === 'direct' ? 'Direct message' : 'Status') +
` by ${originalAccount.display_name || originalAccount.username}`