Remove image, video, and icon from non-media link previews if media links are present to reduce screen clutter

Changelog-Changed: Removed media from regular link previews if media is already being shown
Signed-off-by: Terry Yiu <git@tyiu.xyz>
This commit is contained in:
2025-06-22 18:09:45 -04:00
committed by Daniel D’Aquino
parent c073dd8fea
commit 839ef6a80d

View File

@@ -87,6 +87,12 @@ struct NoteContentView: View {
return linkPreviewWithNoMedia(cached)
}
// If media is already being shown, do not show media in the link preview
// to avoid taking up additional screen space.
if case let .separated(separated) = note_artifacts, !separated.media.isEmpty && !self.options.contains(.no_media) {
return linkPreviewWithNoMedia(cached)
}
return LinkViewRepresentable(meta: .linkmeta(cached))
}