mirror of
				https://github.com/tooot-app/app
				synced 2025-06-05 22:19:13 +02:00 
			
		
		
		
	Fix duplicated images when opening
This commit is contained in:
		| @@ -47,20 +47,6 @@ const TimelineAttachment = React.memo( | |||||||
|     >([]) |     >([]) | ||||||
|     const navigation = useNavigation<StackNavigationProp<RootStackParamList>>() |     const navigation = useNavigation<StackNavigationProp<RootStackParamList>>() | ||||||
|     const navigateToImagesViewer = (id: string) => { |     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', { |       navigation.navigate('Screen-ImagesViewer', { | ||||||
|         imageUrls: imageUrls.current, |         imageUrls: imageUrls.current, | ||||||
|         id |         id | ||||||
| @@ -82,6 +68,15 @@ const TimelineAttachment = React.memo( | |||||||
|           {status.media_attachments.map((attachment, index) => { |           {status.media_attachments.map((attachment, index) => { | ||||||
|             switch (attachment.type) { |             switch (attachment.type) { | ||||||
|               case 'image': |               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 ( |                 return ( | ||||||
|                   <AttachmentImage |                   <AttachmentImage | ||||||
|                     key={index} |                     key={index} | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ const audio = () => { | |||||||
|   log('log', 'audio', 'setting audio playback default options') |   log('log', 'audio', 'setting audio playback default options') | ||||||
|   Audio.setAudioModeAsync({ |   Audio.setAudioModeAsync({ | ||||||
|     playsInSilentModeIOS: true, |     playsInSilentModeIOS: true, | ||||||
|     interruptionModeIOS: InterruptionModeIOS.DuckOthers, |     interruptionModeIOS: InterruptionModeIOS.MixWithOthers, | ||||||
|     interruptionModeAndroid: InterruptionModeAndroid.DuckOthers |     interruptionModeAndroid: InterruptionModeAndroid.DuckOthers | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user