replace react-native-fast-image with expo-image (#452)

This commit is contained in:
Paul Frazee 2023-04-11 12:12:34 -07:00 committed by GitHub
parent 14c8473210
commit a683c9e15f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 21 deletions

View file

@ -7,7 +7,7 @@ import {
View,
ViewStyle,
} from 'react-native'
import Image, {ImageStyle} from 'view/com/util/images/Image'
import {Image, ImageStyle} from 'expo-image'
export const DELAY_PRESS_IN = 500
@ -73,7 +73,7 @@ function ImageLayoutGridInner({
onPressIn?: (index: number) => void
containerInfo: Dim
}) {
const size1 = React.useMemo<StyleProp<ImageStyle>>(() => {
const size1 = React.useMemo<ImageStyle>(() => {
if (type === 'three') {
const size = (containerInfo.width - 10) / 3
return {width: size, height: size, resizeMode: 'cover', borderRadius: 4}
@ -82,7 +82,7 @@ function ImageLayoutGridInner({
return {width: size, height: size, resizeMode: 'cover', borderRadius: 4}
}
}, [type, containerInfo])
const size2 = React.useMemo<StyleProp<ImageStyle>>(() => {
const size2 = React.useMemo<ImageStyle>(() => {
if (type === 'three') {
const size = ((containerInfo.width - 10) / 3) * 2 + 5
return {width: size, height: size, resizeMode: 'cover', borderRadius: 4}