Prefer body over filename in tooltip

This commit is contained in:
niki committed 2026-07-04 19:48:06 +03:00
1 parent 1234d63234
commit b69a00fbac
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ import { useSetting } from '$state/hooks/settings';
import { settingsAtom, CaptionPosition } from '$state/settings';
import type { HTMLReactParserOptions } from 'html-react-parser';
import type { Opts } from 'linkifyjs';
import { Box, config, Tooltip, TooltipProvider } from 'folds';
import { Box, config } from 'folds';
import {
AudioContent,
DownloadFile,
@@ -467,7 +467,7 @@ export function MImage({ content, renderImageContent, outlined, fitParent }: MIm
}}
>
{renderImageContent({
body: content.filename || content.body || 'Image',
body: content.body || content.filename || 'Image',
info: imgInfo,
mimeType: imgInfo?.mimetype,
url: mxcUrl,
@@ -680,7 +680,7 @@ export function MFile({ content, renderFileContent, outlined }: MFileProps) {
<AttachmentBox>
<AttachmentContent>
{renderFileContent({
body: content.filename ?? content.body ?? 'File',
body: content.body ?? content.filename ?? 'File',
info: fileInfo ?? {},
mimeType: fileInfo?.mimetype ?? FALLBACK_MIMETYPE,
url: mxcUrl,