diff --git a/src/status_im/notifications_center/core.cljs b/src/status_im/notifications_center/core.cljs index 5f059e4293..02f8bd0654 100644 --- a/src/status_im/notifications_center/core.cljs +++ b/src/status_im/notifications_center/core.cljs @@ -56,13 +56,14 @@ (fx/defn accept-activity-center-notifications {:events [:accept-activity-center-notifications]} [{:keys [db]} ids] - {:db (update-in db [:activity.center/notifications :notifications] - (fn [items] (remove #(get ids (:id %)) items))) - ::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications") - :params [ids] - :js-response true - :on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %]) - :on-error #()}]}) + (when (seq ids) + {:db (update-in db [:activity.center/notifications :notifications] + (fn [items] (remove #(get ids (:id %)) items))) + ::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications") + :params [ids] + :js-response true + :on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %]) + :on-error #(log/info "unable to accept activity center notifications" %)}]})) (fx/defn accept-all-activity-center-notifications-from-chat {:events [:accept-all-activity-center-notifications-from-chat]} @@ -72,15 +73,16 @@ notifications-from-chat-not-read (filter #(and (= chat-id (:chat-id %)) (not (:read %))) notifications) ids (map :id notifications-from-chat)] - {:db (-> db - (update-in [:activity.center/notifications :notifications] - (fn [items] (filter #(not (= chat-id (:chat-id %))) items))) - (update :activity.center/notifications-count - (min (db :activity.center/notifications-count) (count notifications-from-chat-not-read)))) - ::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications") - :params [ids] - :js-response true - :on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %]) - :on-error #()}]})) + (when (seq ids) + {:db (-> db + (update-in [:activity.center/notifications :notifications] + (fn [items] (filter #(not (= chat-id (:chat-id %))) items))) + (update :activity.center/notifications-count - (min (db :activity.center/notifications-count) (count notifications-from-chat-not-read)))) + ::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications") + :params [ids] + :js-response true + :on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %]) + :on-error #(log/info "unable to accept activity center notifications" %)}]}))) (fx/defn accept-activity-center-notification-and-open-chat {:events [:accept-activity-center-notification-and-open-chat]} diff --git a/status-go-version.json b/status-go-version.json index 6296c20cac..86c886b3eb 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.93.4", - "commit-sha1": "fb1f95a38f6b2a8a51da3f0c4b2bbacade084e70", - "src-sha256": "0dsc1x6kbxaiknb4706j0bzsca2kjwn1pnd32irxz1f41yqqsqgh" + "version": "v0.93.5", + "commit-sha1": "54b35b051052a0eaa74e4d0b123aca3427a27734", + "src-sha256": "14d55yd4rdm9hdc5k888xlm5sjl3iclggzrgxsmjlvfvcg81lf85" }