Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3298417
D9359.id31645.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D9359.id31645.diff
View Options
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
@@ -24,7 +24,6 @@
import SWMansionIcon from './swmansion-icon.react.js';
import ConnectedStatusBar from '../connected-status-bar.react.js';
-import Multimedia from '../media/multimedia.react.js';
import {
useIntentionalSaveMedia,
type IntentionalSaveMedia,
@@ -147,6 +146,7 @@
type BaseProps = {
+navigation: AppNavigationProp<'ImageModal'>,
+route: NavigationRoute<'ImageModal'>,
+ +children: React.Node,
};
type Props = {
...BaseProps,
@@ -1009,7 +1009,6 @@
}
render() {
- const { mediaInfo } = this.props.route.params;
const statusBar = FullScreenViewModal.isActive(this.props) ? (
<ConnectedStatusBar hidden />
) : null;
@@ -1041,7 +1040,7 @@
<Animated.View style={[styles.backdrop, backdropStyle]} />
<View style={this.contentContainerStyle}>
<Animated.View style={this.imageContainerStyle}>
- <Multimedia mediaInfo={mediaInfo} spinnerColor="white" />
+ {this.props.children}
</Animated.View>
</View>
<SafeAreaView style={styles.buttonsOverlay}>
diff --git a/native/media/image-modal.react.js b/native/media/image-modal.react.js
--- a/native/media/image-modal.react.js
+++ b/native/media/image-modal.react.js
@@ -4,6 +4,7 @@
import { type MediaInfo } from 'lib/types/media-types.js';
+import Multimedia from './multimedia.react.js';
import FullScreenViewModal from '../components/full-screen-view-modal.react.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
import type { NavigationRoute } from '../navigation/route-names.js';
@@ -29,7 +30,11 @@
function ImageModal(props: Props): React.Node {
const { navigation, route } = props;
- return <FullScreenViewModal navigation={navigation} route={route} />;
+ return (
+ <FullScreenViewModal navigation={navigation} route={route}>
+ <Multimedia mediaInfo={route.params.mediaInfo} spinnerColor="white" />
+ </FullScreenViewModal>
+ );
}
export default ImageModal;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 6:26 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2534092
Default Alt Text
D9359.id31645.diff (2 KB)
Attached To
Mode
D9359: [native] introduce children prop to FullScreenViewModal
Attached
Detach File
Event Timeline
Log In to Comment