From 43c2f093248432fb072a1be42fceb4273001eef5 Mon Sep 17 00:00:00 2001 From: Foo Pang Date: Fri, 15 Dec 2017 17:55:56 +0800 Subject: [PATCH] [Fix #2613] Long username is not cut with ... on Discover screen --- .../ui/screens/discover/components/views.cljs | 24 +++++++++---------- src/status_im/ui/screens/discover/styles.cljs | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/status_im/ui/screens/discover/components/views.cljs b/src/status_im/ui/screens/discover/components/views.cljs index e5e2e550d5..9b35d811c9 100644 --- a/src/status_im/ui/screens/discover/components/views.cljs +++ b/src/status_im/ui/screens/discover/components/views.cljs @@ -68,8 +68,8 @@ [view/status-view {:id message-id :style styles/discover-item-status-text :status status}] - [react/view styles/discover-list-item-second-row - [react/touchable-highlight {:on-press #(re-frame/dispatch [:show-status-author-profile whisper-id])} + [react/touchable-highlight {:on-press #(re-frame/dispatch [:show-status-author-profile whisper-id])} + [react/view styles/discover-list-item-second-row [react/view styles/discover-list-item-name-container [react/view styles/discover-list-item-avatar-container [chat-icon/chat-icon @@ -79,12 +79,12 @@ [react/text {:style styles/discover-list-item-name :font :medium :number-of-lines 1} - (display-name me? account-name contact-name name whisper-id)]]]] + (display-name me? account-name contact-name name whisper-id)]]] - (when-not me? - (chat-button whisper-id))] - (when show-separator? - [react/view styles/separator])]])) + (when-not me? + (chat-button whisper-id))]] + (when show-separator? + [react/view styles/separator])]])) ;; NOTE(oskarth): Should possibly be merged with discover-list-item-full, but ;; there are too many differences between preview item (main screen) and full @@ -102,8 +102,8 @@ [view/status-view {:id message-id :style styles/discover-item-status-text :status status}] - [react/view styles/discover-list-item-second-row - [react/touchable-highlight {:on-press #(re-frame/dispatch [:show-status-author-profile whisper-id])} + [react/touchable-highlight {:on-press #(re-frame/dispatch [:show-status-author-profile whisper-id])} + [react/view styles/discover-list-item-second-row [react/view styles/discover-list-item-name-container [react/view styles/discover-list-item-avatar-container [chat-icon/chat-icon @@ -113,9 +113,9 @@ [react/text {:style styles/discover-list-item-name :font :medium :number-of-lines 1} - (display-name me? account-name contact-name name whisper-id)]]]] + (display-name me? account-name contact-name name whisper-id)]]] - (when-not me? - (chat-button whisper-id))]] + (when-not me? + (chat-button whisper-id))]]] (when show-separator? [react/view styles/separator])])) diff --git a/src/status_im/ui/screens/discover/styles.cljs b/src/status_im/ui/screens/discover/styles.cljs index 5463717d71..63ad95c13f 100644 --- a/src/status_im/ui/screens/discover/styles.cljs +++ b/src/status_im/ui/screens/discover/styles.cljs @@ -47,7 +47,7 @@ :font-size 16}}) (def discover-list-item-name-container - {:flex 0.3 + {:flex 1 :padding-right 30 :flex-direction :row :justify-content :flex-start