mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
Prefer body over filename in tooltip
This commit is contained in:
1 parent
1234d63234
commit
b69a00fbac
2 files changed
+3
-3
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user