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:
parent
b8787730e5
commit
fa80da5c8f
|
@ -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
|
## v0.2.0 - 2021-01-27
|
||||||
|
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
|
|
|
@ -89,7 +89,7 @@ class CommentWidget extends HookWidget {
|
||||||
final accStore = useAccountsStore();
|
final accStore = useAccountsStore();
|
||||||
|
|
||||||
final isMine = commentTree.comment.comment.creatorId ==
|
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 selectable = useState(false);
|
||||||
final showRaw = useState(false);
|
final showRaw = useState(false);
|
||||||
final collapsed = useState(false);
|
final collapsed = useState(false);
|
||||||
|
|
|
@ -62,7 +62,7 @@ class WriteComment extends HookWidget {
|
||||||
final res = await api.run(CreateComment(
|
final res = await api.run(CreateComment(
|
||||||
content: controller.text,
|
content: controller.text,
|
||||||
postId: post?.post?.id ?? comment.post.id,
|
postId: post?.post?.id ?? comment.post.id,
|
||||||
parentId: comment?.recipient?.id,
|
parentId: comment?.comment?.id,
|
||||||
auth: token.raw,
|
auth: token.raw,
|
||||||
));
|
));
|
||||||
Navigator.of(context).pop(res.commentView);
|
Navigator.of(context).pop(res.commentView);
|
||||||
|
|
Loading…
Reference in New Issue