···
this.showCommentButton = true,
this.disableNavigation = false,
34
+
this.showActions = true,
35
+
this.showHeader = true,
···
final DateTime? currentTime;
final bool showCommentButton;
final bool disableNavigation;
43
+
final bool showActions;
44
+
final bool showHeader;
/// Check if this post should be clickable
/// Only text posts (no embeds or non-video/link embeds) are clickable
···
Widget build(BuildContext context) {
90
-
margin: const EdgeInsets.only(bottom: 8),
91
-
decoration: const BoxDecoration(
94
+
margin: EdgeInsets.only(bottom: showHeader ? 8 : 0),
95
+
decoration: BoxDecoration(
color: AppColors.background,
93
-
border: Border(bottom: BorderSide(color: AppColors.border)),
99
+
? const Border(bottom: BorderSide(color: AppColors.border))
96
-
padding: const EdgeInsets.fromLTRB(16, 4, 16, 1),
103
+
padding: EdgeInsets.fromLTRB(16, showHeader ? 4 : 12, 16, 1),
crossAxisAlignment: CrossAxisAlignment.start,
// Community and author info
103
-
// Community avatar
104
-
_buildCommunityAvatar(post.post.community),
105
-
const SizedBox(width: 8),
108
-
crossAxisAlignment: CrossAxisAlignment.start,
110
-
// Community handle with styled parts
111
-
_buildCommunityHandle(post.post.community),
114
-
'@${post.post.author.handle}',
115
-
style: const TextStyle(
116
-
color: AppColors.textSecondary,
108
+
if (showHeader) ...[
111
+
// Community avatar
112
+
_buildCommunityAvatar(post.post.community),
113
+
const SizedBox(width: 8),
116
+
crossAxisAlignment: CrossAxisAlignment.start,
118
+
// Community handle with styled parts
119
+
_buildCommunityHandle(post.post.community),
122
+
'@${post.post.author.handle}',
123
+
style: const TextStyle(
124
+
color: AppColors.textSecondary,
125
-
DateTimeUtils.formatTimeAgo(
126
-
post.post.createdAt,
127
-
currentTime: currentTime,
133
+
DateTimeUtils.formatTimeAgo(
134
+
post.post.createdAt,
135
+
currentTime: currentTime,
138
+
color: AppColors.textPrimary.withValues(alpha: 0.5),
130
-
color: AppColors.textPrimary.withValues(alpha: 0.5),
136
-
const SizedBox(height: 8),
144
+
const SizedBox(height: 8),
// Wrap content in InkWell if clickable (text-only posts)
···
// Reduced spacing before action buttons
246
-
const SizedBox(height: 4),
255
+
if (showActions) const SizedBox(height: 4),
251
-
showCommentButton: showCommentButton,
259
+
PostCardActions(post: post, showCommentButton: showCommentButton),