Show 3-word names in profile screens in Desktop.

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Igor Mandrigin 2018-10-08 16:27:11 +02:00
parent 3dd532c656
commit 0b22bddca2
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
2 changed files with 12 additions and 2 deletions

View File

@ -44,6 +44,9 @@
(def profile-user-name
{:font-size 18})
(def profile-three-words
{:font-size 14})
(def profile-editing-user-name
(merge profile-user-name
{:height 20

View File

@ -8,6 +8,7 @@
[status-im.i18n :as i18n]
[status-im.ui.components.icons.vector-icons :as vector-icons]
[taoensso.timbre :as log]
[status-im.utils.gfycat.core :as gfy]
[clojure.string :as string]
[status-im.ui.screens.offline-messaging-settings.views :as offline-messaging.views]
[status-im.ui.components.qr-code-viewer.views :as qr-code-viewer]
@ -16,7 +17,7 @@
[status-im.ui.screens.profile.seed.views :as profile.recovery]
[status-im.ui.components.common.common :as components.common]))
(defn profile-badge [{:keys [name photo-path]} editing?]
(defn profile-badge [{:keys [name photo-path public-key]} editing?]
[react/view styles/profile-badge
[react/image {:source {:uri photo-path}
:style styles/profile-photo}]
@ -31,7 +32,13 @@
[react/text {:style styles/profile-user-name
:font :medium
:number-of-lines 1}
name])])
name])
(let [gfy-name (gfy/generate-gfy public-key)]
(when (and (not= gfy-name gfy/unknown-gfy)
(not= gfy-name name))
[react/text {:style styles/profile-three-words
:number-of-lines 1}
gfy-name]))])
(views/defview copied-tooltip [opacity]
(views/letsubs []