fix activity center unique constraint error (#13088)
This commit is contained in:
parent
e1e709220e
commit
e59a2663f7
|
@ -56,13 +56,14 @@
|
|||
(fx/defn accept-activity-center-notifications
|
||||
{:events [:accept-activity-center-notifications]}
|
||||
[{:keys [db]} ids]
|
||||
(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 #()}]})
|
||||
: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,6 +73,7 @@
|
|||
notifications-from-chat-not-read (filter #(and (= chat-id (:chat-id %))
|
||||
(not (:read %))) notifications)
|
||||
ids (map :id notifications-from-chat)]
|
||||
(when (seq ids)
|
||||
{:db (-> db
|
||||
(update-in [:activity.center/notifications :notifications]
|
||||
(fn [items] (filter #(not (= chat-id (:chat-id %))) items)))
|
||||
|
@ -80,7 +82,7 @@
|
|||
:params [ids]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
:on-error #()}]}))
|
||||
: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]}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue