mirror of
https://github.com/penpot/penpot.git
synced 2025-05-07 15:35:54 +02:00
🐛 Fix incorrect number of replies in comments (#5893)
This commit is contained in:
parent
c41aa56a60
commit
d019afe667
1 changed files with 4 additions and 3 deletions
|
@ -621,9 +621,10 @@
|
||||||
[:> comment-content* {:content (:content item)}]]
|
[:> comment-content* {:content (:content item)}]]
|
||||||
|
|
||||||
[:div {:class (stl/css :replies)}
|
[:div {:class (stl/css :replies)}
|
||||||
(let [total-comments (:count-comments item 1)
|
(let [total-comments (:count-comments item)
|
||||||
total-replies (dec total-comments)
|
unread-comments (:count-unread-comments item)
|
||||||
unread-replies (:count-unread-comments item 0)]
|
total-replies (dec total-comments)
|
||||||
|
unread-replies (if (= unread-comments total-comments) (dec unread-comments) unread-comments)]
|
||||||
[:*
|
[:*
|
||||||
(when (> total-replies 0)
|
(when (> total-replies 0)
|
||||||
(if (= total-replies 1)
|
(if (= total-replies 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue