Dismiss keyboard when opening mute chat drawer (#18486)

This commit is contained in:
Ibrahem Khalil 2024-02-12 13:05:56 +02:00 committed by GitHub
parent 6e22e63158
commit da192dcdb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View File

@ -151,7 +151,6 @@
:icon :i/pin
:counter-value pins-count
:on-press (fn []
(rf/dispatch [:dismiss-keyboard])
(rf/dispatch [:pin-message/show-pins-bottom-sheet
chat-id]))}
{:accessibility-label :action-button-mute

View File

@ -147,13 +147,13 @@
(rf/defn show-bottom-sheet
{:events [:show-bottom-sheet]}
[{:keys [db]} content]
[{:keys [db] :as cofx} content]
(let [{:keys [sheets hide?]} (:bottom-sheet db)]
(rf/merge {:db (update-in db [:bottom-sheet :sheets] #(conj % content))}
(rf/merge cofx
{:db (update-in db [:bottom-sheet :sheets] #(conj % content))
:dismiss-keyboard nil}
#(when-not hide?
(if (seq sheets)
(hide-bottom-sheet %)
{:show-bottom-sheet nil})))))
(if (seq sheets) (hide-bottom-sheet %) {:show-bottom-sheet nil})))))
;; LEGACY (should be removed in status 2.0)
(rf/defn hide-signing-sheet