diff --git a/src/status_im/chat/models.cljs b/src/status_im/chat/models.cljs index ed4c4ec7fa..4c0218dc39 100644 --- a/src/status_im/chat/models.cljs +++ b/src/status_im/chat/models.cljs @@ -434,10 +434,12 @@ (fx/defn decrease-unviewed-count {:events [:chat/decrease-unviewed-count]} - [{:keys [db]} chat-id unseen-messages] - {:db (update-in db [:chats chat-id :unviewed-messages-count] - (fn [count] - ;; There might be some other requests being fired, - ;; so we need to make sure the count has not been set to - ;; 0 in the meantime - (max (- count unseen-messages) 0)))}) + [{:keys [db]} chat-id {:keys [count countWithMentions]}] + {:db (-> db + ;; There might be some other requests being fired, + ;; so we need to make sure the count has not been set to + ;; 0 in the meantime + (update-in [:chats chat-id :unviewed-messages-count] + #(max (- % count) 0)) + (update-in [:chats chat-id :unviewed-mentions-count] + #(max (- % countWithMentions) 0)))}) diff --git a/status-go-version.json b/status-go-version.json index 38ea548f49..334804e700 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -2,7 +2,7 @@ "_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh ' instead", "owner": "status-im", "repo": "status-go", - "version": "v0.84.1", - "commit-sha1": "83394e0ed17265cb20ab3e56fe3de13ca4057267", - "src-sha256": "0xhg4n5i8ifv2z3vydi0878n6mv53cajmsr54fpaxqr4lvhrkzza" + "version": "v0.85.0", + "commit-sha1": "0c0e02e93af31207fedb04f98ae6161cd4bcb3df", + "src-sha256": "1dzx8f0gjn5kbwkrfidnfacvahw79p85ampmps57bp0yszvq4rnl" }