From 89d09c4ba59fccc9178a22bee4273d003f7a997c Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Mon, 18 Nov 2019 13:34:46 +0100 Subject: [PATCH] fix chats list and ens example name Signed-off-by: Andrey Shovkoplyas --- .../ui/screens/add_new/new_public_chat/view.cljs | 2 +- src/status_im/ui/screens/ens/views.cljs | 6 +++--- src/status_im/ui/screens/home/views.cljs | 13 +++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/status_im/ui/screens/add_new/new_public_chat/view.cljs b/src/status_im/ui/screens/add_new/new_public_chat/view.cljs index 6fcc85f257..2aa1732cfd 100644 --- a/src/status_im/ui/screens/add_new/new_public_chat/view.cljs +++ b/src/status_im/ui/screens/add_new/new_public_chat/view.cljs @@ -48,7 +48,7 @@ [react/text {:style styles/public-chat-icon-symbol} (first topic)]]) -(defn- render-topic [topic] +(defn render-topic [topic] ^{:key topic} [react/touchable-highlight {:on-press #(start-chat topic) :accessibility-label :chat-item} diff --git a/src/status_im/ui/screens/ens/views.cljs b/src/status_im/ui/screens/ens/views.cljs index 9cd506c726..34e69f41fa 100644 --- a/src/status_im/ui/screens/ens/views.cljs +++ b/src/status_im/ui/screens/ens/views.cljs @@ -651,9 +651,9 @@ {:label-kw :ens-show-username :action-fn #(re-frame/dispatch [::ens/switch-show-username]) :value show?}]] - (let [message (merge {:content {:text (i18n/label :t/ens-test-message)} - :content-type "text/plain" - :timestamp-str "9:41 AM"})] + (let [message {:content {:parsed-text [{:type "paragraph", :children [{:literal (i18n/label :t/ens-test-message)}]}]} + :content-type "text/plain" + :timestamp-str "9:41 AM"}] [react/view [react/view {:padding-left 60} (if show? diff --git a/src/status_im/ui/screens/home/views.cljs b/src/status_im/ui/screens/home/views.cljs index 0e348eb4e2..533bfe9ea4 100644 --- a/src/status_im/ui/screens/home/views.cljs +++ b/src/status_im/ui/screens/home/views.cljs @@ -19,7 +19,8 @@ [status-im.ui.components.animation :as animation] [status-im.constants :as constants] [status-im.ui.components.colors :as colors] - [status-im.utils.fx :as fx]) + [status-im.utils.fx :as fx] + [status-im.ui.screens.add-new.new-public-chat.view :as new-public-chat]) (:require-macros [status-im.utils.views :as views])) (defn welcome-blank-page [blank?] @@ -55,17 +56,13 @@ :accessibility-label :lets-go-button :label (i18n/label :t/lets-go)}]]]]) -(defn- start-chat [topic] - (re-frame/dispatch [:chat.ui/start-public-chat topic {:navigation-reset? true}]) - (re-frame/dispatch [:set :public-group-topic nil])) - (defn chat-tags-view [] [react/view {:align-items :center :margin-top 16} [react/i18n-text {:style styles/no-chats-text :key :follow-your-interests}] [react/view {:style styles/tags-wrapper} - (for [item ["introductions", "chitchat", "status", "crypto", "tech", "music", "movies"]] - [react/touchable-highlight {:key item :on-press #(start-chat item)} - [react/text {:style styles/tag-text} (str "#" item)]])]]) + [react/view {:flex-direction :row :flex-wrap :wrap :justify-content :center} + (for [chat new-public-chat/default-public-chats] + (new-public-chat/render-topic chat))]]]) (defn home-tooltip-view [blank? hide-home-tooltip?] (filter.views/reset-height)