forked from cybrespace/pinafore
refactor status some more
This commit is contained in:
parent
76e78e70e5
commit
835a9a5b28
|
@ -13,12 +13,8 @@
|
|||
{{#if !originalStatus.spoiler_text || spoilerShown}}
|
||||
<StatusContent status="{{originalStatus}}" />
|
||||
{{/if}}
|
||||
{{#if originalStatusMediaAttachments && originalStatusMediaAttachments.length}}
|
||||
<StatusMediaAttachments
|
||||
status="{{originalStatus}}"
|
||||
mediaAttachments="{{originalStatusMediaAttachments}}"
|
||||
on:recalculateHeight
|
||||
/>
|
||||
{{#if hasMedia}}
|
||||
<StatusMediaAttachments status="{{originalStatus}}" on:recalculateHeight />
|
||||
{{/if}}
|
||||
<StatusToolbar :status />
|
||||
</article>
|
||||
|
@ -74,11 +70,11 @@
|
|||
},
|
||||
store: () => store,
|
||||
computed: {
|
||||
isStatusInContext: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
|
||||
originalStatus: (status) => status.reblog ? status.reblog : status,
|
||||
originalAccount: (originalStatus) => originalStatus.account,
|
||||
originalStatusMediaAttachments: (originalStatus) => originalStatus.media_attachments,
|
||||
statusId: (originalStatus) => originalStatus.id,
|
||||
hasMedia: (originalStatus) => originalStatus.media_attachments && originalStatus.media_attachments.length,
|
||||
isStatusInContext: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId,
|
||||
originalAccount: (originalStatus) => originalStatus.account,
|
||||
spoilerShown: ($spoilersShown, $currentInstance, statusId) => $spoilersShown && $spoilersShown[$currentInstance] && $spoilersShown[$currentInstance][statusId]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@
|
|||
},
|
||||
store: () => store,
|
||||
computed: {
|
||||
mediaAttachments: (status) => status.media_attachments,
|
||||
sensitiveShown: ($sensitivesShown, $currentInstance, statusId) => {
|
||||
return $sensitivesShown && $sensitivesShown[$currentInstance] && $sensitivesShown[$currentInstance][statusId]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue