aboutsummaryrefslogtreecommitdiff
path: root/src/components/status/status.js
diff options
context:
space:
mode:
authorxenofem <xenofem@xeno.science>2020-02-08 16:01:01 -0500
committerxenofem <xenofem@xeno.science>2020-02-08 16:01:01 -0500
commite36c39be192ce98fe20e11ea8e2d4fec1b3d50fd (patch)
treecec2bf7d193bdd0235927456360cd54b91acd7c1 /src/components/status/status.js
parent36e19128bf958559437144b26a3e71f30c9b3377 (diff)
Include non-gallery attachments and distinguish between images and videos
Diffstat (limited to 'src/components/status/status.js')
-rw-r--r--src/components/status/status.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 81b57667..fc5956ec 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -256,6 +256,16 @@ const Status = {
file => !fileType.fileMatchesSomeType(this.galleryTypes, file)
)
},
+ hasImageAttachments () {
+ return this.status.attachments.some(
+ file => fileType.fileType(file.mimetype) === 'image'
+ )
+ },
+ hasVideoAttachments () {
+ return this.status.attachments.some(
+ file => fileType.fileType(file.mimetype) === 'video'
+ )
+ },
maxThumbnails () {
return this.mergedConfig.maxThumbnails
},