fix group card remains in shell after leaving the group (#17417)

This commit is contained in:
Parvesh Monu 2023-09-26 20:33:56 +05:30 committed by GitHub
parent da5086aae2
commit 90cb5d3d88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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"