temporary fix for slow chats with long ens names
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
ff41394d9e
commit
c1eb98691c
|
@ -14,12 +14,13 @@
|
||||||
(defn format-author [alias style name]
|
(defn format-author [alias style name]
|
||||||
(let [additional-styles (style false)]
|
(let [additional-styles (style false)]
|
||||||
(if name
|
(if name
|
||||||
[react/text {:number-of-lines 1
|
(let [name (subs name 0 80)]
|
||||||
|
[react/text {:number-of-lines 2
|
||||||
:style (merge {:color colors/blue
|
:style (merge {:color colors/blue
|
||||||
:font-size 13
|
:font-size 13
|
||||||
:line-height 18
|
:line-height 18
|
||||||
:font-weight "500"} additional-styles)}
|
:font-weight "500"} additional-styles)}
|
||||||
(str "@" (or (stateofus/username name) name))]
|
(str "@" (or (stateofus/username name) name))])
|
||||||
[react/text {:style (merge {:color colors/gray
|
[react/text {:style (merge {:color colors/gray
|
||||||
:font-size 12
|
:font-size 12
|
||||||
:line-height 18
|
:line-height 18
|
||||||
|
@ -36,7 +37,7 @@
|
||||||
(or (and (= from current-public-key)
|
(or (and (= from current-public-key)
|
||||||
[react/text {:style (style true)}
|
[react/text {:style (style true)}
|
||||||
(str reply-symbol (i18n/label :t/You))])
|
(str reply-symbol (i18n/label :t/You))])
|
||||||
(format-author reply-name style false))))
|
(format-author (subs reply-name 0 80) style false))))
|
||||||
|
|
||||||
(def ^:private styling->prop
|
(def ^:private styling->prop
|
||||||
{:bold {:style {:font-weight "700"}}
|
{:bold {:style {:font-weight "700"}}
|
||||||
|
|
Loading…
Reference in New Issue