Code Improvements of 15048 (#15351)
This commit is contained in:
parent
b5781a7a83
commit
f981021a1f
|
@ -15,7 +15,8 @@
|
|||
[status-im2.navigation.events :as navigation]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
[utils.re-frame :as rf]
|
||||
[status-im2.contexts.chat.events :as chat.events]))
|
||||
|
||||
(def crop-size 1000)
|
||||
|
||||
|
@ -270,13 +271,12 @@
|
|||
|
||||
(rf/defn status-tag-pressed
|
||||
{:events [:communities/status-tag-pressed]}
|
||||
[{:keys [db]} community-id literal]
|
||||
(let [current-chat-id (:current-chat-id db)
|
||||
{:keys [id]} (some #(when (= (:name %) literal) %)
|
||||
(vals (get-in db [:communities community-id :chats])))]
|
||||
[{:keys [db] :as cofx} community-id literal]
|
||||
(let [{:keys [id]} (some #(when (= (:name %) literal) %)
|
||||
(vals (get-in db [:communities community-id :chats])))]
|
||||
(when (and id
|
||||
(not= current-chat-id (str community-id id)))
|
||||
{:dispatch [:chat/navigate-to-chat (str community-id id)]})))
|
||||
(not= (:current-chat-id db) (str community-id id)))
|
||||
(chat.events/navigate-to-chat cofx (str community-id id) nil))))
|
||||
|
||||
(rf/defn fetch
|
||||
[_]
|
||||
|
|
Loading…
Reference in New Issue