mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(app): put jxl and other image attachments in the mosaic (#2902)
This commit is contained in:
1 parent
c92e5d03a7
commit
82b2f4ec5e
1 file changed
+2
-5
@@ -4,15 +4,12 @@ import type {MessageAttachment} from '@fluxer/schema/src/domains/message/Message
|
||||
|
||||
export const ATTACHMENT_CARD_WIDTH = 400;
|
||||
|
||||
const IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/webp', 'image/avif'];
|
||||
const VIDEO_TYPES = ['video/mp4', 'video/webm', 'video/quicktime'];
|
||||
|
||||
function isImageType(contentType?: string): boolean {
|
||||
return contentType ? IMAGE_TYPES.includes(contentType) : false;
|
||||
return contentType?.startsWith('image/') ?? false;
|
||||
}
|
||||
|
||||
function isVideoType(contentType?: string): boolean {
|
||||
return contentType ? VIDEO_TYPES.includes(contentType) : false;
|
||||
return contentType?.startsWith('video/') ?? false;
|
||||
}
|
||||
|
||||
const hasRenderableDimensions = (attachment: MessageAttachment): boolean =>
|
||||
|
||||
Reference in new issue
Block a user