temporary fix for slow chats with long ens names

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2020-02-10 20:45:05 +01:00
parent ff41394d9e
commit c1eb98691c
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 8 additions and 7 deletions

View File

@ -14,12 +14,13 @@
(defn format-author [alias style name]
(let [additional-styles (style false)]
(if name
[react/text {:number-of-lines 1
:style (merge {:color colors/blue
:font-size 13
:line-height 18
:font-weight "500"} additional-styles)}
(str "@" (or (stateofus/username name) name))]
(let [name (subs name 0 80)]
[react/text {:number-of-lines 2
:style (merge {:color colors/blue
:font-size 13
:line-height 18
:font-weight "500"} additional-styles)}
(str "@" (or (stateofus/username name) name))])
[react/text {:style (merge {:color colors/gray
:font-size 12
:line-height 18
@ -36,7 +37,7 @@
(or (and (= from current-public-key)
[react/text {:style (style true)}
(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
{:bold {:style {:font-weight "700"}}