Hide placeholder timestamp with opacity
Fixes #11084 Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
151ef4a952
commit
8d8057036a
|
@ -124,11 +124,11 @@
|
|||
acc))
|
||||
|
||||
(defn render-parsed-text [message tree]
|
||||
(reduce (fn [acc e] (render-block message acc e)) [react/view {}] tree))
|
||||
(reduce (fn [acc e] (render-block message acc e)) [:<>] tree))
|
||||
|
||||
(defn render-parsed-text-with-timestamp [{:keys [timestamp-str outgoing] :as message} tree]
|
||||
(defn render-parsed-text-with-timestamp [{:keys [timestamp-str] :as message} tree]
|
||||
(let [elements (render-parsed-text message tree)
|
||||
timestamp [react/text {:style (style/message-timestamp-placeholder outgoing)}
|
||||
timestamp [react/text {:style (style/message-timestamp-placeholder)}
|
||||
(str " " timestamp-str)]
|
||||
last-element (peek elements)]
|
||||
;; Using `nth` here as slightly faster than `first`, roughly 30%
|
||||
|
|
|
@ -32,11 +32,8 @@
|
|||
:align-self :flex-end})
|
||||
|
||||
(defn message-timestamp-placeholder
|
||||
[outgoing]
|
||||
(assoc message-timestamp
|
||||
:color (if outgoing
|
||||
colors/blue
|
||||
colors/blue-light)))
|
||||
[]
|
||||
(merge message-timestamp {:opacity 0}))
|
||||
|
||||
(defn message-timestamp-text
|
||||
[justify-timestamp? outgoing rtl?]
|
||||
|
|
Loading…
Reference in New Issue