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:
@@ -87,6 +87,12 @@ struct NoteContentView: View {
|
|||||||
return linkPreviewWithNoMedia(cached)
|
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))
|
return LinkViewRepresentable(meta: .linkmeta(cached))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user