react-native-image-viewer icon indicating copy to clipboard operation
react-native-image-viewer copied to clipboard

loadImage when going back and forth with arrows

Open cooperjbrandon opened this issue 4 years ago • 3 comments

When rendering left and right arrows, on tapping the arrow, either this.goBack() or this.goNext() is called. See current implementation:

            <TouchableWithoutFeedback onPress={this.goBack}>
              <View>{this!.props!.renderArrowLeft!()}</View>
            </TouchableWithoutFeedback>

However, in this.goBack and this.goNext, this.loadImage is never called. So no image is shown. This isn't a problem when doing the actual swipe gesture, because when using the swipe gesture, this.handleHorizontalOuterRangeOffset is invoked, which calls this.loadImage.

So now, pressing the arrows loads the image.

cooperjbrandon avatar Dec 11 '20 18:12 cooperjbrandon

Ah nice! I was running into the same issue

jwesselink avatar Jan 10 '21 14:01 jwesselink

Is there an official release available containing this fix?

Looking at v3.0.1 it was released on 19 May 2020 (https://github.com/ascoders/react-native-image-viewer/releases/tag/v3.0.1). But this commit was from 11 Dec 2020.

HenryDeLange avatar Jun 03 '21 11:06 HenryDeLange

Can this please be merged? I'm experiencing the same issue

noway avatar Aug 13 '21 03:08 noway