fixes requested in code review

* "detatched" -> "detached"
* remove debug comment
This commit is contained in:
krawieck 2021-01-16 16:32:45 +01:00
parent 904e320e10
commit 96d6c36fe9
2 changed files with 4 additions and 5 deletions

View File

@ -25,7 +25,7 @@ class Comment extends HookWidget {
final int indent;
final int postCreatorId;
final CommentTree commentTree;
final bool detatched;
final bool detached;
final bool wasVoted;
@ -41,7 +41,7 @@ class Comment extends HookWidget {
this.commentTree, {
this.indent = 0,
@required this.postCreatorId,
this.detatched = false,
this.detached = false,
}) : wasVoted =
(commentTree.comment.myVote ?? VoteType.none) != VoteType.none;
@ -281,10 +281,9 @@ class Comment extends HookWidget {
content: Text('comment copied to clipboard'))));
}),
const Spacer(),
if (detatched)
if (detached)
_CommentAction(
icon: Icons.link,
// onPressed: () {},
onPressed: () =>
goToPost(context, comment.instanceHost, comment.postId),
tooltip: 'go to post',

View File

@ -75,7 +75,7 @@ class InfiniteCommentList extends StatelessWidget {
builder: (comment) => Comment(
CommentTree(comment),
postCreatorId: null,
detatched: true,
detached: true,
),
fetcher: fetcher,
);