fix: collectibles scroll crash (#18658)

This commit is contained in:
Lungu Cristian 2024-02-06 13:15:23 +02:00 committed by GitHub
parent 2e7a9c82ff
commit 431b6c36ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -3,7 +3,6 @@
[quo.components.markdown.text :as text] [quo.components.markdown.text :as text]
[quo.components.profile.collectible.style :as style] [quo.components.profile.collectible.style :as style]
[react-native.core :as rn] [react-native.core :as rn]
[react-native.fast-image :as fast-image]
[react-native.svg :as svg])) [react-native.svg :as svg]))
(defn remaining-tiles (defn remaining-tiles
@ -25,7 +24,12 @@
{:style {:border-radius (:border-radius image-style) {:style {:border-radius (:border-radius image-style)
:overflow :hidden}} :overflow :hidden}}
[svg/svg-uri (assoc image-style :uri (:uri resource))]] [svg/svg-uri (assoc image-style :uri (:uri resource))]]
[fast-image/fast-image ;; NOTE: using react-native-fast-image here causes a crash on devices when used inside a
;; large flatlist. The library seems to have issues with memory consumption when used with
;; large images/GIFs.
;;
;; https://github.com/DylanVann/react-native-fast-image/issues/195
[rn/image
{:style image-style {:style image-style
:source (if (string? resource) :source (if (string? resource)
{:uri resource {:uri resource