From e36c39be192ce98fe20e11ea8e2d4fec1b3d50fd Mon Sep 17 00:00:00 2001 From: xenofem Date: Sat, 8 Feb 2020 16:01:01 -0500 Subject: Include non-gallery attachments and distinguish between images and videos --- src/components/status/status.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/components/status/status.js') 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 }, -- cgit v1.2.3-70-g09d2