mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 11:06:25 +00:00
refactor: remove images placeholder text (#15830)
* refactor: remove placeholder images text
This commit is contained in:
parent
521765e312
commit
6c5350573d
@ -164,10 +164,7 @@
|
||||
:image-path (utils/safe-replace resized-uri #"file://" "")
|
||||
:image-width width
|
||||
:image-height height
|
||||
;; TODO: message not received if text field is
|
||||
;; nil or empty, issue:
|
||||
;; https://github.com/status-im/status-mobile/issues/14754
|
||||
:text (or input-text "placeholder")
|
||||
:text input-text
|
||||
:response-to message-id})
|
||||
images)))
|
||||
|
||||
|
@ -56,8 +56,7 @@
|
||||
:start {:x 0 :y 1}
|
||||
:end {:x 0 :y 0}
|
||||
:style (style/gradient-container insets animations derived)}
|
||||
(when (not= text "placeholder")
|
||||
[rn/text {:style style/text-style} text])
|
||||
[rn/text {:style style/text-style} text]
|
||||
[rn/flat-list
|
||||
{:ref #(reset! (:small-list-ref atoms) %)
|
||||
:key-fn :message-id
|
||||
|
@ -29,12 +29,10 @@
|
||||
images-count (count (:album message))
|
||||
;; album images are always square, except when we have 3 images, then they must be rectangular
|
||||
;; (portrait or landscape)
|
||||
portrait? (and (= images-count rectangular-style-count) (= album-style :portrait))
|
||||
text (:text (:content first-image))]
|
||||
portrait? (and (= images-count rectangular-style-count) (= album-style :portrait))]
|
||||
(if (and albumize? (> images-count 1))
|
||||
[:<>
|
||||
(when (not= text "placeholder")
|
||||
[rn/view {:style {:margin-bottom 10}} [text/text-content first-image context]])
|
||||
[rn/view {:style {:margin-bottom 10}} [text/text-content first-image context]]
|
||||
[rn/view
|
||||
{:style (style/album-container portrait?)}
|
||||
(map-indexed
|
||||
|
@ -16,8 +16,7 @@
|
||||
(defn image-message
|
||||
[index {:keys [content image-width image-height message-id] :as message} context on-long-press]
|
||||
(let [insets (safe-area/get-insets)
|
||||
dimensions (calculate-dimensions (or image-width 1000) (or image-height 1000))
|
||||
text (:text content)]
|
||||
dimensions (calculate-dimensions (or image-width 1000) (or image-height 1000))]
|
||||
(fn []
|
||||
(let [shared-element-id (rf/sub [:shared-element-id])]
|
||||
[rn/touchable-opacity
|
||||
@ -30,7 +29,7 @@
|
||||
{:messages [message]
|
||||
:index 0
|
||||
:insets insets}])}
|
||||
(when (and (not= text "placeholder") (= index 0))
|
||||
(when (= index 0)
|
||||
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
||||
[fast-image/fast-image
|
||||
{:source {:uri (:image content)}
|
||||
|
@ -44,7 +44,6 @@
|
||||
:icon :i/reply
|
||||
:id :reply}])
|
||||
(when (and (not (or deleted? deleted-for-me?))
|
||||
(not= (get content :text) "placeholder")
|
||||
(not= content-type constants/content-type-audio))
|
||||
[{:type :main
|
||||
:on-press #(react/copy-to-clipboard
|
||||
|
Loading…
x
Reference in New Issue
Block a user