mirror of
https://github.com/tooot-app/app
synced 2025-01-20 21:10:33 +01:00
Fix duplicated images when opening
This commit is contained in:
parent
d0becef5bf
commit
c125382965
@ -47,20 +47,6 @@ const TimelineAttachment = React.memo(
|
||||
>([])
|
||||
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>()
|
||||
const navigateToImagesViewer = (id: string) => {
|
||||
status.media_attachments.forEach(attachment => {
|
||||
switch (attachment.type) {
|
||||
case 'image':
|
||||
imageUrls.current.push({
|
||||
id: attachment.id,
|
||||
preview_url: attachment.preview_url,
|
||||
url: attachment.url,
|
||||
remote_url: attachment.remote_url,
|
||||
blurhash: attachment.blurhash,
|
||||
width: attachment.meta?.original?.width,
|
||||
height: attachment.meta?.original?.height
|
||||
})
|
||||
}
|
||||
})
|
||||
navigation.navigate('Screen-ImagesViewer', {
|
||||
imageUrls: imageUrls.current,
|
||||
id
|
||||
@ -82,6 +68,15 @@ const TimelineAttachment = React.memo(
|
||||
{status.media_attachments.map((attachment, index) => {
|
||||
switch (attachment.type) {
|
||||
case 'image':
|
||||
imageUrls.current.push({
|
||||
id: attachment.id,
|
||||
preview_url: attachment.preview_url,
|
||||
url: attachment.url,
|
||||
remote_url: attachment.remote_url,
|
||||
blurhash: attachment.blurhash,
|
||||
width: attachment.meta?.original?.width,
|
||||
height: attachment.meta?.original?.height
|
||||
})
|
||||
return (
|
||||
<AttachmentImage
|
||||
key={index}
|
||||
|
@ -5,7 +5,7 @@ const audio = () => {
|
||||
log('log', 'audio', 'setting audio playback default options')
|
||||
Audio.setAudioModeAsync({
|
||||
playsInSilentModeIOS: true,
|
||||
interruptionModeIOS: InterruptionModeIOS.DuckOthers,
|
||||
interruptionModeIOS: InterruptionModeIOS.MixWithOthers,
|
||||
interruptionModeAndroid: InterruptionModeAndroid.DuckOthers
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user