Fix bugs with comments (#125)

* fix bug where write comment would respond to parent comment of a comment it should respond to

* update changelog

* fix bug that caused grey comments

* update changelog
This commit is contained in:
Filip Krawczyk 2021-01-30 15:56:35 +01:00 committed by GitHub
parent b8787730e5
commit fa80da5c8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
## Unreleased
### Fixed
- Fixed a bug where replying to a comment would instead reply to the parent of that comment
- Fixed a bug where comments would be displayed as a grey block
## v0.2.0 - 2021-01-27
### Breaking changes

View File

@ -89,7 +89,7 @@ class CommentWidget extends HookWidget {
final accStore = useAccountsStore();
final isMine = commentTree.comment.comment.creatorId ==
accStore.defaultTokenFor(commentTree.comment.instanceHost).payload.id;
accStore.defaultTokenFor(commentTree.comment.instanceHost)?.payload?.id;
final selectable = useState(false);
final showRaw = useState(false);
final collapsed = useState(false);

View File

@ -62,7 +62,7 @@ class WriteComment extends HookWidget {
final res = await api.run(CreateComment(
content: controller.text,
postId: post?.post?.id ?? comment.post.id,
parentId: comment?.recipient?.id,
parentId: comment?.comment?.id,
auth: token.raw,
));
Navigator.of(context).pop(res.commentView);