mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
feat(app): drop the compact attachments media size preference (#1872)
This commit is contained in:
1 parent
eda29c0e34
commit
844952db51
18 files changed
+62
-383
No files matched your search
@@ -106,7 +106,7 @@ const VideoAttachment: FC<AttachmentMediaProps & {message?: Message; isPreview?:
|
||||
const embedUrl = attachment.url ?? '';
|
||||
const proxyUrl = attachment.proxy_url ?? embedUrl;
|
||||
const nsfw = attachment.nsfw || (attachment.flags & MessageAttachmentFlags.CONTAINS_EXPLICIT_MEDIA) !== 0;
|
||||
const attachmentDimensions = getAttachmentMediaDimensions(message);
|
||||
const attachmentDimensions = getAttachmentMediaDimensions();
|
||||
const videoLayoutConstraints = getInlineVideoLayoutConstraints(attachmentDimensions);
|
||||
return (
|
||||
<FocusRing
|
||||
@@ -250,7 +250,7 @@ const AttachmentMedia: FC<AttachmentMediaProps & {message?: Message; isPreview?:
|
||||
/>
|
||||
);
|
||||
}
|
||||
const attachmentDimensions = getAttachmentMediaDimensions(message);
|
||||
const attachmentDimensions = getAttachmentMediaDimensions();
|
||||
const mediaCalculator = createCalculator({
|
||||
maxWidth: attachmentDimensions.maxWidth,
|
||||
maxHeight: attachmentDimensions.maxHeight,
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ export const AttachmentGridItem: FC<AttachmentGridItemProps> = observer(
|
||||
) : (
|
||||
node
|
||||
);
|
||||
const mosaicDimensions = getMosaicMediaDimensions(message);
|
||||
const mosaicDimensions = getMosaicMediaDimensions();
|
||||
const maxMosaicWidth = mosaicDimensions.maxWidth;
|
||||
let targetWidth = maxMosaicWidth;
|
||||
let targetHeight = maxMosaicWidth;
|
||||
|
||||
@@ -54,7 +54,7 @@ const AttachmentMosaicComponent: FC<AttachmentMosaicProps> = observer(
|
||||
({attachments, message, hideExpiryFootnote, isPreview, snapshotIndex, onDelete}) => {
|
||||
const {i18n} = useLingui();
|
||||
const mediaAttachments = useMemo(() => attachments.filter(isMediaAttachment), [attachments]);
|
||||
const mosaicDimensions = getMosaicMediaDimensions(message);
|
||||
const mosaicDimensions = getMosaicMediaDimensions();
|
||||
const mosaicStyle: AttachmentMosaicStyle = {
|
||||
'--attachment-media-max-height': remFromPx(mosaicDimensions.maxHeight),
|
||||
'--attachment-media-max-width': remFromPx(mosaicDimensions.maxWidth),
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ export const AttachmentSingleMedia: FC<AttachmentSingleMediaProps> = observer(
|
||||
);
|
||||
const naturalWidth = attachment.width!;
|
||||
const naturalHeight = attachment.height!;
|
||||
const attachmentDimensions = getAttachmentMediaDimensions(message);
|
||||
const attachmentDimensions = getAttachmentMediaDimensions();
|
||||
const videoLayoutConstraints = getInlineVideoLayoutConstraints(attachmentDimensions);
|
||||
const standaloneMediaCalculator = createCalculator({
|
||||
maxWidth: attachmentDimensions.maxWidth,
|
||||
|
||||
Reference in new issue
Block a user