diff --git a/src/status_im/ui/screens/home/sheet/views.cljs b/src/status_im/ui/screens/home/sheet/views.cljs index b944888532..d03938695d 100644 --- a/src/status_im/ui/screens/home/sheet/views.cljs +++ b/src/status_im/ui/screens/home/sheet/views.cljs @@ -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) diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index 6aa58aecfa..bc4ac06ad8 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -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}])) diff --git a/src/status_im/ui2/screens/chat/components/new_chat/view.cljs b/src/status_im/ui2/screens/chat/components/new_chat/view.cljs index 5d7515f1e9..0d2438ca36 100644 --- a/src/status_im/ui2/screens/chat/components/new_chat/view.cljs +++ b/src/status_im/ui2/screens/chat/components/new_chat/view.cljs @@ -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])