From b00b77895f7bf64b35b2a697abbf3f9bdf781c03 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 13 Mar 2024 14:07:36 +0100 Subject: [PATCH] :bug: Fix comment number in sidebar --- frontend/src/app/main/data/comments.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/comments.cljs b/frontend/src/app/main/data/comments.cljs index ce8e1bd6d..5762229d4 100644 --- a/frontend/src/app/main/data/comments.cljs +++ b/frontend/src/app/main/data/comments.cljs @@ -274,7 +274,9 @@ (ptk/reify ::delete-comment ptk/UpdateEvent (update [_ state] - (d/update-in-when state [:comments thread-id] dissoc id)) + (-> state + (d/update-in-when [:comments thread-id] dissoc id) + (d/update-in-when [:comment-threads thread-id :count-comments] dec))) ptk/WatchEvent (watch [_ state _]