[Fixes #10746] Correctly show reply symbol
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
f1272f4d49
commit
254fd229b5
|
@ -4,9 +4,13 @@
|
||||||
[status-im.ui.components.react :as react]
|
[status-im.ui.components.react :as react]
|
||||||
[status-im.ui.components.colors :as colors]))
|
[status-im.ui.components.colors :as colors]))
|
||||||
|
|
||||||
|
(def ^:private reply-symbol "↪ ")
|
||||||
|
|
||||||
(defn format-author [contact-name style]
|
(defn format-author [contact-name style]
|
||||||
(let [additional-styles (style false)]
|
(let [additional-styles (style false)]
|
||||||
(if (= (aget contact-name 0) "@")
|
(if (or (= (aget contact-name 0) "@")
|
||||||
|
;; in case of replies
|
||||||
|
(= (aget contact-name 1) "@"))
|
||||||
(let [trimmed-name (subs contact-name 0 81)]
|
(let [trimmed-name (subs contact-name 0 81)]
|
||||||
[react/text {:number-of-lines 2
|
[react/text {:number-of-lines 2
|
||||||
:style (merge {:color colors/blue
|
:style (merge {:color colors/blue
|
||||||
|
@ -20,10 +24,8 @@
|
||||||
:font-weight "400"} additional-styles)}
|
:font-weight "400"} additional-styles)}
|
||||||
contact-name])))
|
contact-name])))
|
||||||
|
|
||||||
(def ^:private reply-symbol "↪ ")
|
|
||||||
|
|
||||||
(defn format-reply-author [from username current-public-key style]
|
(defn format-reply-author [from username current-public-key style]
|
||||||
(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 username style)))
|
(format-author (str reply-symbol username) style)))
|
||||||
|
|
Loading…
Reference in New Issue