From 9a66d7df6470730056f61b05775ff8ff7f600f7d Mon Sep 17 00:00:00 2001 From: Patrick Britton Date: Sun, 8 Feb 2026 15:22:18 -0600 Subject: [PATCH] feat: move link preview card (news widget) above post body text --- sojorn_app/lib/widgets/sojorn_post_card.dart | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/sojorn_app/lib/widgets/sojorn_post_card.dart b/sojorn_app/lib/widgets/sojorn_post_card.dart index b92e908..20c6bb9 100644 --- a/sojorn_app/lib/widgets/sojorn_post_card.dart +++ b/sojorn_app/lib/widgets/sojorn_post_card.dart @@ -227,6 +227,16 @@ class _sojornPostCardState extends ConsumerState { ), 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 { ], ], - // 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) ...[