fix selected members are not shown on the group creation screen (#14991)

This commit is contained in:
Parvesh Monu 2023-02-06 22:13:45 +05:30 committed by GitHub
parent 739d10a9ef
commit b9ac26edd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -76,8 +76,10 @@
:icon-color (colors/theme-colors colors/neutral-50 colors/neutral-40)
:accessibility-label :start-a-new-chat
:icon :i/new-message
:on-press #(hide-sheet-and-dispatch [:bottom-sheet/show-sheet
:start-a-new-chat {}])}]
:on-press (fn []
(rf/dispatch [:group-chat/clear-contacts])
(hide-sheet-and-dispatch [:bottom-sheet/show-sheet
:start-a-new-chat {}]))}]
[quo2/menu-item
{:type :transparent
:title (i18n/label :t/add-a-contact)

View File

@ -259,7 +259,9 @@
(views/letsubs [logging-in? [:multiaccounts/login]]
[components.plus-button/plus-button-old
{:on-press (when-not logging-in?
#(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}]))
(fn []
(re-frame/dispatch [:group-chat/clear-contacts])
(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}])))
:loading logging-in?
:accessibility-label :new-chat-button}]))
@ -268,7 +270,9 @@
(views/letsubs [logging-in? [:multiaccounts/login]]
[components.plus-button/plus-button-old
{:on-press (when-not logging-in?
#(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}]))
(fn []
(re-frame/dispatch [:group-chat/clear-contacts])
(re-frame/dispatch [:bottom-sheet/show-sheet :start-a-new-chat {}])))
:loading logging-in?
:accessibility-label :new-chat-button}]))

View File

@ -13,7 +13,6 @@
[quo2.components.markdown.text :as text]
[status-im.ui.components.invite.events :as invite.events]
[status-im.ui2.screens.chat.components.new-chat.styles :as style]
[quo.react :as quo.react]
[quo.components.safe-area :as safe-area]
[status-im.react-native.resources :as resources]))
@ -65,7 +64,6 @@
[]
[:f>
(fn []
(quo.react/effect! #(rf/dispatch [:group-chat/clear-contacts]) [])
(let [contacts (rf/sub
[:contacts/sorted-and-grouped-by-first-letter])
selected-contacts-count (rf/sub [:selected-contacts-count])