File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,7 @@ const GalleryThumbnail = <
332332 onLongPress = { ( event ) => {
333333 if ( onLongPress ) {
334334 onLongPress ( {
335+ additionalInfo : { thumbnail } ,
335336 emitter : 'gallery' ,
336337 event,
337338 } ) ;
@@ -340,6 +341,7 @@ const GalleryThumbnail = <
340341 onPress = { ( event ) => {
341342 if ( onPress ) {
342343 onPress ( {
344+ additionalInfo : { thumbnail } ,
343345 defaultHandler : defaultOnPress ,
344346 emitter : 'gallery' ,
345347 event,
@@ -349,6 +351,7 @@ const GalleryThumbnail = <
349351 onPressIn = { ( event ) => {
350352 if ( onPressIn ) {
351353 onPressIn ( {
354+ additionalInfo : { thumbnail } ,
352355 defaultHandler : defaultOnPress ,
353356 emitter : 'gallery' ,
354357 event,
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import {
4040 isEditedMessage ,
4141 MessageStatusTypes ,
4242} from '../../utils/utils' ;
43+ import type { Thumbnail } from '../Attachment/utils/buildGallery/types' ;
4344
4445import {
4546 isMessageWithStylesReadByAndDateSeparator ,
@@ -74,16 +75,25 @@ export type FileAttachmentTouchableHandlerPayload<
7475 additionalInfo ?: { attachment ?: Attachment < StreamChatGenerics > } ;
7576} ;
7677
78+ export type GalleryThumbnailTouchableHandlerPayload = {
79+ emitter : 'gallery' ;
80+ additionalInfo ?: { thumbnail ?: Thumbnail } ;
81+ } ;
82+
7783export type PressableHandlerPayload = {
7884 defaultHandler ?: ( ) => void ;
7985 event ?: GestureResponderEvent ;
8086} & (
8187 | {
82- emitter ?: Exclude < TouchableEmitter , 'textMention' | 'textLink' | 'card' | 'fileAttachment' > ;
88+ emitter ?: Exclude <
89+ TouchableEmitter ,
90+ 'textMention' | 'textLink' | 'card' | 'fileAttachment' | 'gallery'
91+ > ;
8392 }
8493 | TextMentionTouchableHandlerPayload
8594 | UrlTouchableHandlerPayload
8695 | FileAttachmentTouchableHandlerPayload
96+ | GalleryThumbnailTouchableHandlerPayload
8797) ;
8898
8999export type MessagePressableHandlerPayload <
You can’t perform that action at this time.
0 commit comments