1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Try out live text view

This commit is contained in:
xmflsct
2022-10-30 17:42:57 +01:00
parent d203c00279
commit 82be585a5b
4 changed files with 29 additions and 14 deletions

View File

@ -22,6 +22,7 @@ import {
FlingGestureHandler,
LongPressGestureHandler
} from 'react-native-gesture-handler'
import { LiveTextImageView } from 'react-native-live-text-image-view'
import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom'
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context'
import saveImage from './ImageViewer/save'
@ -115,20 +116,22 @@ const ScreenImagesViewer = ({
justifyContent: 'center'
}}
>
<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 }}
blurhash={item.blurhash}
dimension={{
width:
screenRatio > imageRatio
? (SCREEN_HEIGHT / imageHeight) * imageWidth
: SCREEN_WIDTH,
height:
screenRatio > imageRatio
? SCREEN_HEIGHT
: (SCREEN_WIDTH / imageWidth) * imageHeight
}}
/>
</LiveTextImageView>
</View>
}
/>