Close chat when closing group chat details (#18149)

This commit is contained in:
Ibrahem Khalil 2023-12-15 20:28:30 +02:00 committed by GitHub
parent 5507ae4fa2
commit f8e935c58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 82 additions and 73 deletions

View File

@ -20,7 +20,9 @@
:icon-only? true
:container-style {:margin-left 20}
:accessibility-label :back-button
:on-press #(rf/dispatch [:navigate-back])}
:on-press (fn []
(rf/dispatch [:navigate-back])
(rf/dispatch [:chat/close]))}
:i/arrow-left])
(defn options-button
@ -149,8 +151,11 @@
:on-press show-profile-actions}})
item]))
(defn group-details
(defn f-group-details
[]
(fn []
(rn/use-effect (fn []
#(rf/dispatch [:chat/close])))
(let [{:keys [admins chat-id chat-name color public?
muted contacts]} (rf/sub [:chats/current-chat])
members (rf/sub [:contacts/group-members-sections])
@ -222,4 +227,8 @@
:render-section-header-fn contacts-section-header
:render-data {:chat-id chat-id
:admin? admin?}
:render-fn contact-item-render}]]))
:render-fn contact-item-render}]])))
(defn group-details
[]
[:f> f-group-details])