1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
Zhiyuan Zheng
2021-02-14 00:27:21 +01:00
parent a9326c381a
commit 13efb56324
7 changed files with 214 additions and 203 deletions

View File

@ -32,11 +32,7 @@ const TimelineAttachment: React.FC<Props> = ({ status }) => {
haptics('Light')
}, [])
let imageUrls: (App.IImageInfo & {
preview_url: Mastodon.AttachmentImage['preview_url']
remote_url?: Mastodon.AttachmentImage['remote_url']
imageIndex: number
})[] = []
let imageUrls: Nav.RootStackParamList['Screen-ImagesViewer']['imageUrls'] = []
const navigation = useNavigation()
const navigateToImagesViewer = (imageIndex: number) =>
navigation.navigate('Screen-ImagesViewer', {
@ -52,6 +48,8 @@ const TimelineAttachment: React.FC<Props> = ({ status }) => {
url: attachment.url,
preview_url: attachment.preview_url,
remote_url: attachment.remote_url,
width: attachment.meta?.original?.width,
height: attachment.meta?.original?.height,
imageIndex: index
})
return (