diff --git a/src/status_im/contexts/shell/activity_center/events.cljs b/src/status_im/contexts/shell/activity_center/events.cljs index a7fadcbfef..60b5220d8d 100644 --- a/src/status_im/contexts/shell/activity_center/events.cljs +++ b/src/status_im/contexts/shell/activity_center/events.cljs @@ -156,14 +156,20 @@ :on-error [:activity-center/process-notification-failure nil :notification/mark-all-as-read]}]}))) -(rf/defn mark-all-as-read-success - {:events [:activity-center.notifications/mark-all-as-read-success]} - [{:keys [db]}] +(defn merge-chats + [db chats] + (update db :chats merge (collection/index-by :chat-id chats))) + +(defn mark-all-as-read-success + [{:keys [db]} [{:keys [chats] :as _messenger-response}]] {:db (-> (reduce (fn [acc notification-type] (assoc-in acc [:activity-center :unread-counts-by-type notification-type] 0)) db types/all-supported) - (update :activity-center dissoc :mark-all-as-read-undoable-till))}) + (update :activity-center dissoc :mark-all-as-read-undoable-till) + (merge-chats (map data-store.chats/<-rpc chats)))}) + +(rf/reg-event-fx :activity-center.notifications/mark-all-as-read-success mark-all-as-read-success) (rf/defn undo-mark-all-as-read {:events [:activity-center.notifications/undo-mark-all-as-read-locally]} diff --git a/status-go-version.json b/status-go-version.json index 42e7556b8b..5287eb2875 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.171.39", - "commit-sha1": "debfe1cab368140b16d2383efc68007d3c28a4ef", - "src-sha256": "0cbj3796qz69ylwcvdw5jsl1cdyrcfk81d7shjkakvjh59rv5sjk" + "version": "v0.172.2", + "commit-sha1": "5cb1972261de90fee1469ae60ffb7f25900a9850", + "src-sha256": "1z37yinlxwpzprd10h2f4vzs5k2a1k85ks9lvl067lb4rqflcwny" }