Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion library/ImageViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,16 @@ export default class ImageViewer extends Component{
});
}


componentDidMount() {

// compoentWillReceiveProps not be triggle ...
if(this.props.shown){
//initial state data
this.init(this.props);
}
}

componentWillReceiveProps(nextProps){

if(nextProps.shown){
Expand Down Expand Up @@ -403,7 +413,7 @@ export default class ImageViewer extends Component{
width:imageUrls.length * screenWidth,
transform: [{ translateX: this.animatedPositionX}]
}]}>
{this.state.imagesInfo.length && this.getImageList()}
{ this.state.imagesInfo.length > 0 ? this.getImageList() : null}
</Animated.View>
{
!this.state.imageLoaded ?
Expand Down