File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ export const Gallery = withMessageContentContext(
7979 super ( props ) ;
8080 this . state = {
8181 viewerModalOpen : false ,
82+ viewerModalImageIndex : 0 ,
8283 } ;
8384 }
8485
@@ -156,7 +157,10 @@ export const Gallery = withMessageContentContext(
156157 length = { images . length }
157158 activeOpacity = { 0.8 }
158159 onPress = { ( ) => {
159- this . setState ( { viewerModalOpen : true } ) ;
160+ this . setState ( {
161+ viewerModalOpen : true ,
162+ viewerModalImageIndex : i ,
163+ } ) ;
160164 } }
161165 onLongPress = { this . props . onLongPress }
162166 >
@@ -224,6 +228,7 @@ export const Gallery = withMessageContentContext(
224228 onCancel = { ( ) => {
225229 this . setState ( { viewerModalOpen : false } ) ;
226230 } }
231+ index = { this . state . viewerModalImageIndex }
227232 enableSwipeDown
228233 renderHeader = { ( ) => (
229234 < GalleryHeader
You can’t perform that action at this time.
0 commit comments