[16352] [Bugfix] New message indicator not showing on bottom navigation for unmuted chats and another bug (#16380)
This commit is contained in:
parent
b5a96a254a
commit
e0a0c6331f
|
@ -56,8 +56,10 @@
|
|||
(when (and (not locked?)
|
||||
muted?)
|
||||
[quo2.icons/icon :i/muted
|
||||
{:size 20
|
||||
:color colors/neutral-40}])
|
||||
{:size 20
|
||||
:color colors/neutral-40
|
||||
:container-style {:margin-right 1
|
||||
:margin-top 2}}])
|
||||
(when (and (not locked?)
|
||||
(not muted?)
|
||||
(pos? (int mentions-count)))
|
||||
|
|
|
@ -166,12 +166,11 @@
|
|||
(defn calculate-unviewed-counts
|
||||
[chats]
|
||||
(reduce (fn [acc {:keys [unviewed-mentions-count unviewed-messages-count muted]}]
|
||||
{:unviewed-messages-count (if-not muted
|
||||
(+ (:unviewed-messages-count acc) (or unviewed-messages-count 0))
|
||||
0)
|
||||
:unviewed-mentions-count (if-not muted
|
||||
(+ (:unviewed-mentions-count acc) (or unviewed-mentions-count 0))
|
||||
0)})
|
||||
(if-not muted
|
||||
(-> acc
|
||||
(update :unviewed-messages-count + unviewed-messages-count)
|
||||
(update :unviewed-mentions-count + unviewed-mentions-count))
|
||||
acc))
|
||||
{:unviewed-messages-count 0
|
||||
:unviewed-mentions-count 0}
|
||||
chats))
|
||||
|
|
|
@ -190,19 +190,19 @@
|
|||
(let [{:keys [chats-stack community-stack]}
|
||||
(reduce
|
||||
(fn [acc [_ {:keys [unviewed-messages-count unviewed-mentions-count chat-type muted]}]]
|
||||
(case chat-type
|
||||
constants/community-chat-type
|
||||
(when-not muted
|
||||
(-> acc
|
||||
(update-in [:community-stack :unviewed-messages-count] + unviewed-messages-count)
|
||||
(update-in [:community-stack :unviewed-mentions-count] + unviewed-mentions-count)))
|
||||
|
||||
(constants/private-group-chat-type constants/one-to-one-chat-type)
|
||||
(when-not muted
|
||||
(-> acc
|
||||
(update-in [:chats-stack :unviewed-messages-count] + unviewed-messages-count)
|
||||
(update-in [:chats-stack :unviewed-mentions-count] + unviewed-mentions-count)))
|
||||
(cond
|
||||
(and (not muted)
|
||||
(= chat-type constants/community-chat-type))
|
||||
(-> acc
|
||||
(update-in [:community-stack :unviewed-messages-count] + unviewed-messages-count)
|
||||
(update-in [:community-stack :unviewed-mentions-count] + unviewed-mentions-count))
|
||||
|
||||
(and (not muted)
|
||||
(#{constants/private-group-chat-type constants/one-to-one-chat-type} chat-type))
|
||||
(-> acc
|
||||
(update-in [:chats-stack :unviewed-messages-count] + unviewed-messages-count)
|
||||
(update-in [:chats-stack :unviewed-mentions-count] + unviewed-mentions-count))
|
||||
:else
|
||||
acc))
|
||||
{:chats-stack {:unviewed-messages-count 0 :unviewed-mentions-count 0}
|
||||
:community-stack {:unviewed-messages-count 0 :unviewed-mentions-count 0}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.159.6",
|
||||
"commit-sha1": "f23cb4065bce9cff3cb8174a10bf9d8d49a4789f",
|
||||
"src-sha256": "1yv24cqj2gnf2rgws39vc0j54l0dfxa6vc74iqcxgm50gd73gf6s"
|
||||
"version": "v0.159.7",
|
||||
"commit-sha1": "323e02eb1708a30cb0c566b876f511001e3e2c0e",
|
||||
"src-sha256": "1kxpv05kkdvlnb2n0abd6wmxk3f3cw3a4pspsvsbwyn5jparvbkq"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue