fix: reduce spacing around link preview card - remove top padding, tighten gap above
This commit is contained in:
parent
858d556d25
commit
701150bc8c
|
|
@ -4,9 +4,6 @@ import '../../models/post.dart';
|
||||||
import '../../theme/app_theme.dart';
|
import '../../theme/app_theme.dart';
|
||||||
import 'post_view_mode.dart';
|
import 'post_view_mode.dart';
|
||||||
|
|
||||||
/// Full-width link preview card shown below the post body.
|
|
||||||
/// Displays OG image as a full-width thumbnail (same sizing as post images),
|
|
||||||
/// with title, description, and site name overlaid/below.
|
|
||||||
class PostLinkPreview extends StatelessWidget {
|
class PostLinkPreview extends StatelessWidget {
|
||||||
final Post post;
|
final Post post;
|
||||||
final PostViewMode mode;
|
final PostViewMode mode;
|
||||||
|
|
@ -40,9 +37,7 @@ class PostLinkPreview extends StatelessWidget {
|
||||||
final description = post.linkPreviewDescription ?? '';
|
final description = post.linkPreviewDescription ?? '';
|
||||||
final siteName = post.linkPreviewSiteName ?? '';
|
final siteName = post.linkPreviewSiteName ?? '';
|
||||||
|
|
||||||
return Padding(
|
return GestureDetector(
|
||||||
padding: const EdgeInsets.only(top: 12),
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () => _launchUrl(post.linkPreviewUrl!),
|
onTap: () => _launchUrl(post.linkPreviewUrl!),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -148,7 +143,6 @@ class PostLinkPreview extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ class _sojornPostCardState extends ConsumerState<sojornPostCard> {
|
||||||
],
|
],
|
||||||
// Link preview card after post body
|
// Link preview card after post body
|
||||||
if (post.hasLinkPreview) ...[
|
if (post.hasLinkPreview) ...[
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 8),
|
||||||
PostLinkPreview(
|
PostLinkPreview(
|
||||||
post: post,
|
post: post,
|
||||||
mode: mode,
|
mode: mode,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue