Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temporary fix for app crash if chat has long ens names #10022

Merged
merged 1 commit into from
Feb 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/status_im/ui/screens/chat/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"}}
Expand Down