feat: move link preview card (news widget) above post body text

This commit is contained in:
Patrick Britton 2026-02-08 15:22:18 -06:00
parent ea692da571
commit 9a66d7df64

View file

@ -227,6 +227,16 @@ class _sojornPostCardState extends ConsumerState<sojornPostCard> {
),
const SizedBox(height: 16),
// Link preview card ABOVE body text for news posts
if (post.hasLinkPreview &&
(post.imageUrl == null || post.imageUrl!.isEmpty) &&
(post.videoUrl == null || post.videoUrl!.isEmpty)) ...[
Padding(
padding: EdgeInsets.only(bottom: 12),
child: PostLinkPreview(post: post, mode: mode),
),
],
// Body text - clickable for post detail with full background coverage
if (_shouldBlurNsfw) ...[
// NSFW blurred body
@ -311,15 +321,6 @@ class _sojornPostCardState extends ConsumerState<sojornPostCard> {
],
],
// Link preview card (if post has OG metadata and no image/video)
if (post.hasLinkPreview &&
(post.imageUrl == null || post.imageUrl!.isEmpty) &&
(post.videoUrl == null || post.videoUrl!.isEmpty)) ...[
Padding(
padding: EdgeInsets.symmetric(horizontal: _padding.left),
child: PostLinkPreview(post: post, mode: mode),
),
],
// NSFW warning banner with tap-to-reveal
if (_shouldBlurNsfw) ...[