0
Fork 0
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:
luisδμ 2025-02-18 17:25:43 +01:00 committed by GitHub
parent c41aa56a60
commit d019afe667
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)