diff --git a/native/components/full-screen-view-modal.react.js b/native/components/full-screen-view-modal.react.js --- a/native/components/full-screen-view-modal.react.js +++ b/native/components/full-screen-view-modal.react.js @@ -160,7 +160,7 @@ +closeButtonEnabled: boolean, +actionLinksEnabled: boolean, }; -class ImageModal extends React.PureComponent { +class FullScreenViewModal extends React.PureComponent { state: State = { closeButtonEnabled: true, actionLinksEnabled: true, @@ -232,7 +232,7 @@ ); const { overlayContext } = props; - invariant(overlayContext, 'ImageModal should have OverlayContext'); + invariant(overlayContext, 'FullScreenViewModal should have OverlayContext'); const navigationProgress = overlayContext.position; // The inputs we receive from PanGestureHandler @@ -910,13 +910,13 @@ } componentDidMount() { - if (ImageModal.isActive(this.props)) { + if (FullScreenViewModal.isActive(this.props)) { Orientation.unlockAllOrientations(); } } componentWillUnmount() { - if (ImageModal.isActive(this.props)) { + if (FullScreenViewModal.isActive(this.props)) { Orientation.lockToPortrait(); } } @@ -926,8 +926,8 @@ this.updateDimensions(); } - const isActive = ImageModal.isActive(this.props); - const wasActive = ImageModal.isActive(prevProps); + const isActive = FullScreenViewModal.isActive(this.props); + const wasActive = FullScreenViewModal.isActive(prevProps); if (isActive && !wasActive) { Orientation.unlockAllOrientations(); } else if (!isActive && wasActive) { @@ -991,7 +991,7 @@ static isActive(props) { const { overlayContext } = props; - invariant(overlayContext, 'ImageModal should have OverlayContext'); + invariant(overlayContext, 'FullScreenViewModal should have OverlayContext'); return !overlayContext.isDismissing; } @@ -1002,7 +1002,7 @@ const bottom = fullScreenHeight - verticalBounds.y - verticalBounds.height; // margin will clip, but padding won't - const verticalStyle = ImageModal.isActive(this.props) + const verticalStyle = FullScreenViewModal.isActive(this.props) ? { paddingTop: top, paddingBottom: bottom } : { marginTop: top, marginBottom: bottom }; return [styles.contentContainer, verticalStyle]; @@ -1010,7 +1010,7 @@ render() { const { mediaInfo } = this.props.route.params; - const statusBar = ImageModal.isActive(this.props) ? ( + const statusBar = FullScreenViewModal.isActive(this.props) ? (