fix group card remains in shell after leaving the group (#17417)
This commit is contained in:
parent
da5086aae2
commit
90cb5d3d88
|
@ -20,10 +20,11 @@
|
||||||
|
|
||||||
(rf/defn handle-chat-removed
|
(rf/defn handle-chat-removed
|
||||||
{:events [:chat-removed]}
|
{:events [:chat-removed]}
|
||||||
[cofx response]
|
[cofx response chat-id]
|
||||||
(rf/merge cofx
|
(rf/merge cofx
|
||||||
{:db (dissoc (:db cofx) :current-chat-id)
|
{:db (dissoc (:db cofx) :current-chat-id)
|
||||||
:dispatch-n [[:sanitize-messages-and-process-response response]
|
:dispatch-n [[:shell/close-switcher-card chat-id]
|
||||||
|
[:sanitize-messages-and-process-response response]
|
||||||
[:pop-to-root :shell-stack]]}
|
[:pop-to-root :shell-stack]]}
|
||||||
(activity-center/notifications-fetch-unread-count)))
|
(activity-center/notifications-fetch-unread-count)))
|
||||||
|
|
||||||
|
@ -117,7 +118,7 @@
|
||||||
{:json-rpc/call [{:method "wakuext_leaveGroupChat"
|
{:json-rpc/call [{:method "wakuext_leaveGroupChat"
|
||||||
:params [nil chat-id true]
|
:params [nil chat-id true]
|
||||||
:js-response true
|
:js-response true
|
||||||
:on-success #(re-frame/dispatch [:chat-removed %])}]})
|
:on-success #(re-frame/dispatch [:chat-removed % chat-id])}]})
|
||||||
|
|
||||||
(rf/defn remove
|
(rf/defn remove
|
||||||
"Remove chat"
|
"Remove chat"
|
||||||
|
|
Loading…
Reference in New Issue