Try to squeeze perf
This commit is contained in:
@@ -377,7 +377,7 @@ const ImageItem = ({
|
|||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
style={[styles.container]}
|
style={[styles.container]}
|
||||||
renderToHardwareTextureAndroid>
|
renderToHardwareTextureAndroid>
|
||||||
<Animated.View style={containerStyle}>
|
<Animated.View style={containerStyle} renderToHardwareTextureAndroid>
|
||||||
{showLoader && (
|
{showLoader && (
|
||||||
<ActivityIndicator
|
<ActivityIndicator
|
||||||
size="small"
|
size="small"
|
||||||
@@ -385,8 +385,9 @@ const ImageItem = ({
|
|||||||
style={styles.loading}
|
style={styles.loading}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Animated.View style={imageCropStyle}>
|
<Animated.View style={imageCropStyle} renderToHardwareTextureAndroid>
|
||||||
<AnimatedImage
|
<AnimatedImage
|
||||||
|
renderToHardwareTextureAndroid
|
||||||
contentFit="cover"
|
contentFit="cover"
|
||||||
source={{uri: imageSrc.uri}}
|
source={{uri: imageSrc.uri}}
|
||||||
placeholderContentFit="cover"
|
placeholderContentFit="cover"
|
||||||
|
|||||||
@@ -179,6 +179,7 @@ function ImageView({
|
|||||||
}
|
}
|
||||||
return {pointerEvents: 'auto'}
|
return {pointerEvents: 'auto'}
|
||||||
})
|
})
|
||||||
|
|
||||||
const backdropStyle = useAnimatedStyle(() => {
|
const backdropStyle = useAnimatedStyle(() => {
|
||||||
const screenSize = measure(safeAreaRef)
|
const screenSize = measure(safeAreaRef)
|
||||||
let opacity = 1
|
let opacity = 1
|
||||||
@@ -191,10 +192,12 @@ function ImageView({
|
|||||||
)
|
)
|
||||||
opacity -= dragProgress
|
opacity -= dragProgress
|
||||||
}
|
}
|
||||||
|
const factor = isIOS ? 100 : 50
|
||||||
return {
|
return {
|
||||||
opacity,
|
opacity: Math.round(opacity * factor) / factor,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const animatedHeaderStyle = useAnimatedStyle(() => {
|
const animatedHeaderStyle = useAnimatedStyle(() => {
|
||||||
const show = showControls && dismissSwipeTranslateY.value === 0
|
const show = showControls && dismissSwipeTranslateY.value === 0
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user