diff --git a/native/media/encrypted-image.react.js b/native/media/encrypted-image.react.js --- a/native/media/encrypted-image.react.js +++ b/native/media/encrypted-image.react.js @@ -12,7 +12,7 @@ type BaseProps = { +holder: string, +encryptionKey: string, - +onLoad: (uri: string) => void, + +onLoad?: (uri: string) => void, +spinnerColor: string, +style: ImageStyle, +invisibleLoad: boolean, diff --git a/native/media/loadable-image.react.js b/native/media/loadable-image.react.js --- a/native/media/loadable-image.react.js +++ b/native/media/loadable-image.react.js @@ -10,7 +10,7 @@ type Props = { +placeholder: ?ImageSource, +source: ?ImageSource, - +onLoad: () => void, + +onLoad?: () => void, +spinnerColor: string, +style: ImageStyle, +invisibleLoad: boolean, diff --git a/native/media/multimedia.react.js b/native/media/multimedia.react.js --- a/native/media/multimedia.react.js +++ b/native/media/multimedia.react.js @@ -102,21 +102,26 @@ const { currentSource, departingSource } = this.state; if (departingSource) { images.push(this.renderSource(currentSource, true)); - images.push(this.renderSource(departingSource, true)); + images.push(this.renderSource(departingSource, false, false)); } else { images.push(this.renderSource(currentSource)); } return {images}; } - renderSource(source: Source, invisibleLoad?: boolean = false) { + renderSource( + source: Source, + invisibleLoad?: boolean = false, + triggerOnLoad?: boolean = true, + ) { + const onLoadProp = triggerOnLoad ? this.onLoad : undefined; if (source.kind === 'encrypted') { return ( void, + +onLoad?: (uri: string) => void, +spinnerColor: string, +style: ImageStyle, +invisibleLoad: boolean,