fix: image flicker (#15932)
This commit is contained in:
parent
6598873343
commit
03f501ca7b
|
@ -18,6 +18,9 @@
|
||||||
(let [insets (safe-area/get-insets)
|
(let [insets (safe-area/get-insets)
|
||||||
dimensions (calculate-dimensions (or image-width 1000) (or image-height 1000))
|
dimensions (calculate-dimensions (or image-width 1000) (or image-height 1000))
|
||||||
shared-element-id (rf/sub [:shared-element-id])]
|
shared-element-id (rf/sub [:shared-element-id])]
|
||||||
|
[:<>
|
||||||
|
(when (= index 0)
|
||||||
|
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
||||||
[rn/touchable-opacity
|
[rn/touchable-opacity
|
||||||
{:active-opacity 1
|
{:active-opacity 1
|
||||||
:style {:margin-top (when (pos? index) 10)}
|
:style {:margin-top (when (pos? index) 10)}
|
||||||
|
@ -27,9 +30,7 @@
|
||||||
{:messages [message]
|
{:messages [message]
|
||||||
:index 0
|
:index 0
|
||||||
:insets insets}])}
|
:insets insets}])}
|
||||||
(when (= index 0)
|
|
||||||
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
|
||||||
[fast-image/fast-image
|
[fast-image/fast-image
|
||||||
{:source {:uri (:image content)}
|
{:source {:uri (:image content)}
|
||||||
:style (merge dimensions {:border-radius 12})
|
:style (merge dimensions {:border-radius 12})
|
||||||
:native-ID (when (= shared-element-id message-id) :shared-element)}]]))
|
:native-ID (when (= shared-element-id message-id) :shared-element)}]]]))
|
||||||
|
|
Loading…
Reference in New Issue