mirror of
https://github.com/penpot/penpot.git
synced 2025-04-08 13:01:24 -05: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)}]]
|
||||
|
||||
[:div {:class (stl/css :replies)}
|
||||
(let [total-comments (:count-comments item 1)
|
||||
total-replies (dec total-comments)
|
||||
unread-replies (:count-unread-comments item 0)]
|
||||
(let [total-comments (:count-comments item)
|
||||
unread-comments (:count-unread-comments item)
|
||||
total-replies (dec total-comments)
|
||||
unread-replies (if (= unread-comments total-comments) (dec unread-comments) unread-comments)]
|
||||
[:*
|
||||
(when (> total-replies 0)
|
||||
(if (= total-replies 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue