mirror of
https://github.com/status-im/status-react.git
synced 2025-02-17 05:16:46 +00:00
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))
|
acc))
|
||||||
|
|
||||||
(defn render-parsed-text [message tree]
|
(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)
|
(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)]
|
(str " " timestamp-str)]
|
||||||
last-element (peek elements)]
|
last-element (peek elements)]
|
||||||
;; Using `nth` here as slightly faster than `first`, roughly 30%
|
;; Using `nth` here as slightly faster than `first`, roughly 30%
|
||||||
|
@ -32,11 +32,8 @@
|
|||||||
:align-self :flex-end})
|
:align-self :flex-end})
|
||||||
|
|
||||||
(defn message-timestamp-placeholder
|
(defn message-timestamp-placeholder
|
||||||
[outgoing]
|
[]
|
||||||
(assoc message-timestamp
|
(merge message-timestamp {:opacity 0}))
|
||||||
:color (if outgoing
|
|
||||||
colors/blue
|
|
||||||
colors/blue-light)))
|
|
||||||
|
|
||||||
(defn message-timestamp-text
|
(defn message-timestamp-text
|
||||||
[justify-timestamp? outgoing rtl?]
|
[justify-timestamp? outgoing rtl?]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user