mirror of
https://github.com/status-im/status-react.git
synced 2025-01-12 03:54:32 +00:00
fix: image flicker (#15932)
This commit is contained in:
parent
6598873343
commit
03f501ca7b
@ -18,18 +18,19 @@
|
|||||||
(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])]
|
||||||
[rn/touchable-opacity
|
[:<>
|
||||||
{:active-opacity 1
|
|
||||||
:style {:margin-top (when (pos? index) 10)}
|
|
||||||
:on-long-press on-long-press
|
|
||||||
:on-press #(rf/dispatch [:chat.ui/navigate-to-lightbox
|
|
||||||
message-id
|
|
||||||
{:messages [message]
|
|
||||||
:index 0
|
|
||||||
:insets insets}])}
|
|
||||||
(when (= index 0)
|
(when (= index 0)
|
||||||
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
[rn/view {:style {:margin-bottom 10}} [text/text-content message context]])
|
||||||
[fast-image/fast-image
|
[rn/touchable-opacity
|
||||||
{:source {:uri (:image content)}
|
{:active-opacity 1
|
||||||
:style (merge dimensions {:border-radius 12})
|
:style {:margin-top (when (pos? index) 10)}
|
||||||
:native-ID (when (= shared-element-id message-id) :shared-element)}]]))
|
:on-long-press on-long-press
|
||||||
|
:on-press #(rf/dispatch [:chat.ui/navigate-to-lightbox
|
||||||
|
message-id
|
||||||
|
{:messages [message]
|
||||||
|
:index 0
|
||||||
|
:insets insets}])}
|
||||||
|
[fast-image/fast-image
|
||||||
|
{:source {:uri (:image content)}
|
||||||
|
:style (merge dimensions {:border-radius 12})
|
||||||
|
:native-ID (when (= shared-element-id message-id) :shared-element)}]]]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user