diff --git a/src/status_im/ui/screens/chat/message/link_preview.cljs b/src/status_im/ui/screens/chat/message/link_preview.cljs index adb022bccf..b2d7c1a1b0 100644 --- a/src/status_im/ui/screens/chat/message/link_preview.cljs +++ b/src/status_im/ui/screens/chat/message/link_preview.cljs @@ -123,7 +123,8 @@ [quo/separator] [quo/button {:on-press #(re-frame/dispatch [:navigate-to :community - {:community-id (:id community)}]) + {:from-chat true + :community-id (:id community)}]) :type :secondary} (i18n/label :t/view)]])) diff --git a/src/status_im/ui/screens/communities/community.cljs b/src/status_im/ui/screens/communities/community.cljs index 605677b1b1..07e837ee47 100644 --- a/src/status_im/ui/screens/communities/community.cljs +++ b/src/status_im/ui/screens/communities/community.cljs @@ -139,21 +139,21 @@ :color :secondary} text]]) -(defn community-chat-item [{:keys [chat-id] :as home-item}] +(defn community-chat-item [{:keys [chat-id] :as home-item} _ _ {:keys [from-chat]}] [inner-item/home-list-item ;; We want communities to behave as public chats when it comes to ;; unread indicator (assoc home-item :public? true) {:on-press (fn [] (re-frame/dispatch [:dismiss-keyboard]) - (re-frame/dispatch [:chat.ui/navigate-to-chat chat-id true]) + (re-frame/dispatch [:chat.ui/navigate-to-chat chat-id (not from-chat)]) (re-frame/dispatch [:search/home-filter-changed nil]) (re-frame/dispatch [:accept-all-activity-center-notifications-from-chat chat-id])) :on-long-press #(re-frame/dispatch [:bottom-sheet/show-sheet {:content (fn [] [sheets/actions home-item])}])}]) -(defn categories-accordion [community-id chats categories edit] +(defn categories-accordion [community-id chats categories edit data] [rn/view {:padding-bottom 8} (for [{:keys [name id]} (vals categories)] ^{:key (str "cat" name id)} @@ -181,10 +181,10 @@ [inner-item/home-list-item (assoc chat :public? true)]]] ^{:key (str "chat" chat id)} - [community-chat-item chat]))]}] + [community-chat-item chat nil nil data]))]}] [quo/separator]])]) -(defn community-chat-list [community-id categories edit] +(defn community-chat-list [community-id categories edit from-chat] (let [chats (