Skip to content

Commit 9bae4a7

Browse files
authored
Handle search result comments on deleted posts (#1249)
1 parent 8a4f4fc commit 9bae4a7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/shared/comment_reference.dart

+9-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class _CommentReferenceState extends State<CommentReference> {
9494
${formatTimeToString(dateTime: (widget.comment.comment.updated ?? widget.comment.comment.published).toIso8601String())}\n
9595
${widget.comment.comment.content}""",
9696
child: InkWell(
97-
onTap: () async => await navigateToComment(context, widget.comment),
97+
onTap: widget.comment.post.deleted ? null : () async => await navigateToComment(context, widget.comment),
9898
child: Padding(
9999
padding: const EdgeInsets.symmetric(vertical: 4.0),
100100
child: Column(
@@ -111,6 +111,14 @@ class _CommentReferenceState extends State<CommentReference> {
111111
children: [
112112
Row(
113113
children: [
114+
if (widget.comment.post.deleted) ...[
115+
const Icon(
116+
Icons.delete_rounded,
117+
size: 15,
118+
color: Colors.red,
119+
),
120+
const SizedBox(width: 5),
121+
],
114122
Flexible(
115123
child: ExcludeSemantics(
116124
child: Text(

0 commit comments

Comments
 (0)