From f1a484cc662174717118bff1274aa473f5fa6ad9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 4 Nov 2022 22:05:49 +0300 Subject: Fix editing --- vnext/src/ui/Thread.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vnext/src/ui/Thread.js') diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js index d00c197e..979ef72b 100644 --- a/vnext/src/ui/Thread.js +++ b/vnext/src/ui/Thread.js @@ -67,7 +67,8 @@ export default function Thread(props) { let postComment = (template) => { const { body, attach } = template; let commentAction = editing.rid ? update(mid, editing.rid, body) : comment(mid, active, body, attach); - commentAction.then(() => { + commentAction.then((res) => { + console.log(res); setEditing(emptyMessage); loadReplies(); }) @@ -75,7 +76,7 @@ export default function Thread(props) { }; let startEditing = (reply) => { - setActive(reply.replyto); + setActive(reply.to.rid || 0); setEditing(reply); }; -- cgit v1.2.3