@@ -4,7 +4,6 @@ import { Pressable, StyleSheet, Text, View } from 'react-native';
44import type { Attachment } from 'stream-chat' ;
55
66import { GalleryImage } from './GalleryImage' ;
7- import { ImageReloadIndicator } from './ImageReloadIndicator' ;
87import { buildGallery } from './utils/buildGallery/buildGallery' ;
98
109import type { Thumbnail } from './utils/buildGallery/types' ;
@@ -58,6 +57,7 @@ export type GalleryPropsWithContext<
5857 | 'VideoThumbnail'
5958 | 'ImageLoadingIndicator'
6059 | 'ImageLoadingFailedIndicator'
60+ | 'ImageReloadIndicator'
6161 | 'myMessageTheme'
6262 > &
6363 Pick < OverlayContextValue , 'setOverlay' > & {
@@ -90,6 +90,7 @@ const GalleryWithContext = <
9090 hasThreadReplies,
9191 ImageLoadingFailedIndicator,
9292 ImageLoadingIndicator,
93+ ImageReloadIndicator,
9394 images,
9495 legacyImageViewerSwipeBehaviour,
9596 message,
@@ -207,6 +208,7 @@ const GalleryWithContext = <
207208 colIndex = { colIndex }
208209 ImageLoadingFailedIndicator = { ImageLoadingFailedIndicator }
209210 ImageLoadingIndicator = { ImageLoadingIndicator }
211+ ImageReloadIndicator = { ImageReloadIndicator }
210212 imagesAndVideos = { imagesAndVideos }
211213 invertedDirections = { invertedDirections || false }
212214 key = { rowIndex }
@@ -258,6 +260,7 @@ type GalleryThumbnailProps<
258260 | 'VideoThumbnail'
259261 | 'ImageLoadingIndicator'
260262 | 'ImageLoadingFailedIndicator'
263+ | 'ImageReloadIndicator'
261264> &
262265 Pick < ImageGalleryContextValue < StreamChatGenerics > , 'setSelectedMessage' | 'setMessages' > &
263266 Pick <
@@ -274,6 +277,7 @@ const GalleryThumbnail = <
274277 colIndex,
275278 ImageLoadingFailedIndicator,
276279 ImageLoadingIndicator,
280+ ImageReloadIndicator,
277281 imagesAndVideos,
278282 invertedDirections,
279283 legacyImageViewerSwipeBehaviour,
@@ -397,6 +401,7 @@ const GalleryThumbnail = <
397401 borderRadius = { imageBorderRadius ?? borderRadius }
398402 ImageLoadingFailedIndicator = { ImageLoadingFailedIndicator }
399403 ImageLoadingIndicator = { ImageLoadingIndicator }
404+ ImageReloadIndicator = { ImageReloadIndicator }
400405 thumbnail = { thumbnail }
401406 />
402407 </ View >
@@ -425,10 +430,15 @@ const GalleryImageThumbnail = <
425430 borderRadius,
426431 ImageLoadingFailedIndicator,
427432 ImageLoadingIndicator,
433+ ImageReloadIndicator,
428434 thumbnail,
429435} : Pick <
430436 GalleryThumbnailProps < StreamChatGenerics > ,
431- 'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'thumbnail' | 'borderRadius'
437+ | 'ImageLoadingFailedIndicator'
438+ | 'ImageLoadingIndicator'
439+ | 'ImageReloadIndicator'
440+ | 'thumbnail'
441+ | 'borderRadius'
432442> ) => {
433443 const {
434444 isLoadingImage,
@@ -585,6 +595,7 @@ export const Gallery = <
585595 hasThreadReplies,
586596 ImageLoadingFailedIndicator : PropImageLoadingFailedIndicator ,
587597 ImageLoadingIndicator : PropImageLoadingIndicator ,
598+ ImageReloadIndicator : PropImageReloadIndicator ,
588599 images : propImages ,
589600 message : propMessage ,
590601 myMessageTheme : propMyMessageTheme ,
@@ -617,6 +628,7 @@ export const Gallery = <
617628 additionalPressableProps : contextAdditionalPressableProps ,
618629 ImageLoadingFailedIndicator : ContextImageLoadingFailedIndicator ,
619630 ImageLoadingIndicator : ContextImageLoadingIndicator ,
631+ ImageReloadIndicator : ContextImageReloadIndicator ,
620632 legacyImageViewerSwipeBehaviour,
621633 myMessageTheme : contextMyMessageTheme ,
622634 VideoThumbnail : ContextVideoThumnbnail ,
@@ -646,6 +658,7 @@ export const Gallery = <
646658 const ImageLoadingFailedIndicator =
647659 PropImageLoadingFailedIndicator || ContextImageLoadingFailedIndicator ;
648660 const ImageLoadingIndicator = PropImageLoadingIndicator || ContextImageLoadingIndicator ;
661+ const ImageReloadIndicator = PropImageReloadIndicator || ContextImageReloadIndicator ;
649662 const myMessageTheme = propMyMessageTheme || contextMyMessageTheme ;
650663
651664 return (
@@ -658,6 +671,7 @@ export const Gallery = <
658671 hasThreadReplies : hasThreadReplies || ! ! message ?. reply_count ,
659672 ImageLoadingFailedIndicator,
660673 ImageLoadingIndicator,
674+ ImageReloadIndicator,
661675 images,
662676 legacyImageViewerSwipeBehaviour,
663677 message,
0 commit comments