Skip to content

Commit

Permalink
Clear home filter when opening chats
Browse files Browse the repository at this point in the history
Fixes #11015 Fixes #11013

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
  • Loading branch information
Ferossgp committed Aug 12, 2020
1 parent f128c0c commit 62fe9f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/status_im/ui/screens/home/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,17 @@
:title (or ens-name (utils/get-shortened-address public-key))
:subtitle (i18n/label :t/join-new-private-chat)
:on-press (fn []
(debounce/dispatch-and-chill [:contact.ui/contact-code-submitted false] 3000))}])
(debounce/dispatch-and-chill [:contact.ui/contact-code-submitted false] 3000)
(re-frame/dispatch [:search/home-filter-changed nil]))}])
(when valid-public?
[quo/list-item {:theme :accent
:icon :main-icons/public-chat
:title (str "#" search-value)
:subtitle (i18n/label :t/join-new-public-chat)
:on-press (fn []
(re-frame/dispatch [:chat.ui/start-public-chat search-value])
(re-frame/dispatch [:set :public-group-topic nil]))}])])))
(re-frame/dispatch [:set :public-group-topic nil])
(re-frame/dispatch [:search/home-filter-changed nil]))}])])))

(views/defview chats-list []
(views/letsubs [loading? [:chats/loading?]
Expand Down
1 change: 1 addition & 0 deletions src/status_im/ui/screens/home/views/inner_item.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
:on-press #(do
(re-frame/dispatch [:dismiss-keyboard])
(re-frame/dispatch [:chat.ui/navigate-to-chat chat-id])
(re-frame/dispatch [:search/home-filter-changed nil])
(if public?
(re-frame/dispatch [:chat.ui/mark-public-all-read chat-id])
(re-frame/dispatch [:chat.ui/mark-messages-seen :chat])))
Expand Down

0 comments on commit 62fe9f3

Please sign in to comment.