Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

loadImage when going back and forth with arrows - #442

Open
cooperjbrandon wants to merge 1 commit into
ascoders:masterfrom
BravaHome:master
Open

loadImage when going back and forth with arrows#442
cooperjbrandon wants to merge 1 commit into
ascoders:masterfrom
BravaHome:master

Conversation

@cooperjbrandon

Copy link
Copy Markdown

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.

@jwesselink

Copy link
Copy Markdown

Ah nice! I was running into the same issue

@HenryDeLange

Copy link
Copy Markdown

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.

@noway

noway commented Aug 13, 2021

Copy link
Copy Markdown

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants