mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Bump up packages
This commit is contained in:
@@ -4,15 +4,13 @@ import React, { useMemo, useState } from 'react'
|
||||
import {
|
||||
AccessibilityProps,
|
||||
Image,
|
||||
ImageStyle,
|
||||
Platform,
|
||||
Pressable,
|
||||
StyleProp,
|
||||
StyleSheet,
|
||||
View,
|
||||
ViewStyle
|
||||
} from 'react-native'
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import FastImage, { ImageStyle } from 'react-native-fast-image'
|
||||
import { Blurhash } from 'react-native-blurhash'
|
||||
|
||||
// blurhas -> if blurhash, show before any loading succeed
|
||||
@@ -97,30 +95,17 @@ const GracefullyImage = ({
|
||||
{...(onPress ? (hidden ? { disabled: true } : { onPress }) : { disabled: true })}
|
||||
>
|
||||
{uri.preview && !imageLoaded ? (
|
||||
<Image
|
||||
fadeDuration={0}
|
||||
<FastImage
|
||||
source={{ uri: uri.preview }}
|
||||
style={[styles.placeholder, { backgroundColor: colors.shimmerDefault }]}
|
||||
/>
|
||||
) : null}
|
||||
{Platform.OS === 'ios' ? (
|
||||
<Image
|
||||
fadeDuration={0}
|
||||
source={source}
|
||||
style={[{ flex: 1 }, imageStyle]}
|
||||
onLoad={onLoad}
|
||||
onError={onError}
|
||||
/>
|
||||
) : (
|
||||
<FastImage
|
||||
fadeDuration={0}
|
||||
source={source}
|
||||
// @ts-ignore
|
||||
style={[{ flex: 1 }, imageStyle]}
|
||||
onLoad={onLoad}
|
||||
onError={onError}
|
||||
/>
|
||||
)}
|
||||
<FastImage
|
||||
source={source}
|
||||
style={[{ flex: 1 }, imageStyle]}
|
||||
onLoad={onLoad}
|
||||
onError={onError}
|
||||
/>
|
||||
{blurhashView}
|
||||
</Pressable>
|
||||
)
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
ViewToken
|
||||
} from 'react-native'
|
||||
import { Directions, Gesture, LongPressGestureHandler } from 'react-native-gesture-handler'
|
||||
import { LiveTextImageView } from 'react-native-live-text-image-view'
|
||||
import { runOnJS, useSharedValue } from 'react-native-reanimated'
|
||||
import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
@@ -117,22 +116,19 @@ const ScreenImagesViewer = ({
|
||||
justifyContent: 'center'
|
||||
}}
|
||||
>
|
||||
<LiveTextImageView>
|
||||
<GracefullyImage
|
||||
uri={{ preview: item.preview_url, remote: item.remote_url, original: item.url }}
|
||||
blurhash={item.blurhash}
|
||||
dimension={{
|
||||
width:
|
||||
screenRatio > imageRatio
|
||||
? (SCREEN_HEIGHT / imageHeight) * imageWidth
|
||||
: SCREEN_WIDTH,
|
||||
height:
|
||||
screenRatio > imageRatio
|
||||
? SCREEN_HEIGHT
|
||||
: (SCREEN_WIDTH / imageWidth) * imageHeight
|
||||
}}
|
||||
/>
|
||||
</LiveTextImageView>
|
||||
<GracefullyImage
|
||||
uri={{ preview: item.preview_url, remote: item.remote_url, original: item.url }}
|
||||
dimension={{
|
||||
width:
|
||||
screenRatio > imageRatio
|
||||
? (SCREEN_HEIGHT / imageHeight) * imageWidth
|
||||
: SCREEN_WIDTH,
|
||||
height:
|
||||
screenRatio > imageRatio
|
||||
? SCREEN_HEIGHT
|
||||
: (SCREEN_WIDTH / imageWidth) * imageHeight
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user