Clear home filter when opening chats

Fixes #11015 Fixes #11013

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
Gheorghe Pinzaru 2020-08-11 11:19:56 +03:00
parent f128c0ceed
commit 62fe9f3d6a
No known key found for this signature in database
GPG Key ID: C9A094959935A952
2 changed files with 5 additions and 2 deletions

View File

@ -119,7 +119,8 @@
: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
@ -127,7 +128,8 @@
: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?]

View File

@ -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])))