[Fix] Admin Notification marked unread after closing and reopening AC (#14824)
* [Fix][#14823] Admin Notification unread issue * [Fix][#14823] Changed dispatch of event from the PR feedback * [Fix][#14823] Organize dispatch of event from the PR feedback * [Fix][#14823] Organize dispatch of event from the PR feedback
This commit is contained in:
parent
897a5eb201
commit
6722b45076
|
@ -558,16 +558,20 @@
|
|||
(rf/defn request-to-join-accepted
|
||||
{:events [::request-to-join-accepted]}
|
||||
[{:keys [db] :as cofx} community-id request-id response-js]
|
||||
(rf/merge cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)}
|
||||
(handle-response response-js)))
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)
|
||||
:dispatch-n [[:sanitize-messages-and-process-response response-js]
|
||||
[:activity-center.notifications/mark-as-read request-id]]}))
|
||||
|
||||
(rf/defn request-to-join-declined
|
||||
{:events [::request-to-join-declined]}
|
||||
[{:keys [db] :as cofx} community-id request-id response-js]
|
||||
(rf/merge cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)}
|
||||
(handle-response response-js)))
|
||||
(rf/merge
|
||||
cofx
|
||||
{:db (update-in db [:communities/requests-to-join community-id] dissoc request-id)
|
||||
:dispatch-n [[:sanitize-messages-and-process-response response-js]
|
||||
[:activity-center.notifications/mark-as-read request-id]]}))
|
||||
|
||||
(rf/defn accept-request-to-join-pressed
|
||||
{:events [:communities.ui/accept-request-to-join-pressed]}
|
||||
|
|
|
@ -41,15 +41,11 @@
|
|||
:type :danger
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:communities.ui/decline-request-to-join-pressed
|
||||
community-id id])
|
||||
(rf/dispatch [:activity-center.notifications/mark-as-read
|
||||
id]))}
|
||||
community-id id]))}
|
||||
:button-2 {:label (i18n/label :t/accept)
|
||||
:accessibility-label :accept-join-request
|
||||
:type :positive
|
||||
:on-press (fn []
|
||||
(rf/dispatch [:communities.ui/accept-request-to-join-pressed
|
||||
community-id id])
|
||||
(rf/dispatch [:activity-center.notifications/mark-as-read
|
||||
id]))}}
|
||||
community-id id]))}}
|
||||
nil))]))
|
||||
|
|
Loading…
Reference in New Issue