Changeset View
Changeset View
Standalone View
Standalone View
native/components/full-screen-view-modal.react.js
- This file was copied from native/media/image-modal.react.js.
| Show All 14 Lines | import { | ||||
| PanGestureHandler, | PanGestureHandler, | ||||
| TapGestureHandler, | TapGestureHandler, | ||||
| State as GestureState, | State as GestureState, | ||||
| } from 'react-native-gesture-handler'; | } from 'react-native-gesture-handler'; | ||||
| import Orientation from 'react-native-orientation-locker'; | import Orientation from 'react-native-orientation-locker'; | ||||
| import Animated from 'react-native-reanimated'; | import Animated from 'react-native-reanimated'; | ||||
| import { SafeAreaView } from 'react-native-safe-area-context'; | import { SafeAreaView } from 'react-native-safe-area-context'; | ||||
| import { type MediaInfo, type Dimensions } from 'lib/types/media-types.js'; | import { type Dimensions } from 'lib/types/media-types.js'; | ||||
| import Multimedia from './multimedia.react.js'; | import SWMansionIcon from './swmansion-icon.react.js'; | ||||
| import ConnectedStatusBar from '../connected-status-bar.react.js'; | |||||
| import Multimedia from '../media/multimedia.react.js'; | |||||
| import { | import { | ||||
| useIntentionalSaveMedia, | useIntentionalSaveMedia, | ||||
| type IntentionalSaveMedia, | type IntentionalSaveMedia, | ||||
| } from './save-media.js'; | } from '../media/save-media.js'; | ||||
| import SWMansionIcon from '../components/swmansion-icon.react.js'; | |||||
| import ConnectedStatusBar from '../connected-status-bar.react.js'; | |||||
| import { displayActionResultModal } from '../navigation/action-result-modal.js'; | import { displayActionResultModal } from '../navigation/action-result-modal.js'; | ||||
| import type { AppNavigationProp } from '../navigation/app-navigator.react.js'; | import type { AppNavigationProp } from '../navigation/app-navigator.react.js'; | ||||
| import { | import { | ||||
| OverlayContext, | OverlayContext, | ||||
| type OverlayContextType, | type OverlayContextType, | ||||
| } from '../navigation/overlay-context.js'; | } from '../navigation/overlay-context.js'; | ||||
| import type { NavigationRoute } from '../navigation/route-names.js'; | import type { NavigationRoute } from '../navigation/route-names.js'; | ||||
| import { useSelector } from '../redux/redux-utils.js'; | import { useSelector } from '../redux/redux-utils.js'; | ||||
| import { | import { | ||||
| type DerivedDimensionsInfo, | type DerivedDimensionsInfo, | ||||
| derivedDimensionsInfoSelector, | derivedDimensionsInfoSelector, | ||||
| } from '../selectors/dimensions-selectors.js'; | } from '../selectors/dimensions-selectors.js'; | ||||
| import type { ChatMultimediaMessageInfoItem } from '../types/chat-types.js'; | |||||
| import { | |||||
| type VerticalBounds, | |||||
| type LayoutCoordinates, | |||||
| } from '../types/layout-types.js'; | |||||
| import type { NativeMethods } from '../types/react-native.js'; | import type { NativeMethods } from '../types/react-native.js'; | ||||
| import { | import { | ||||
| clamp, | clamp, | ||||
| gestureJustStarted, | gestureJustStarted, | ||||
| gestureJustEnded, | gestureJustEnded, | ||||
| runTiming, | runTiming, | ||||
| } from '../utils/animation-utils.js'; | } from '../utils/animation-utils.js'; | ||||
| ▲ Show 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | cond(not(clockRunning(clock)), [ | ||||
| startStopClock ? startClock(clock) : undefined, | startStopClock ? startClock(clock) : undefined, | ||||
| ]), | ]), | ||||
| decay(clock, state, config), | decay(clock, state, config), | ||||
| cond(state.finished, startStopClock ? stopClock(clock) : undefined), | cond(state.finished, startStopClock ? stopClock(clock) : undefined), | ||||
| state.position, | state.position, | ||||
| ]); | ]); | ||||
| } | } | ||||
| export type ImageModalParams = { | |||||
| +presentedFrom: string, | |||||
| +mediaInfo: MediaInfo, | |||||
| +initialCoordinates: LayoutCoordinates, | |||||
| +verticalBounds: VerticalBounds, | |||||
| +item: ChatMultimediaMessageInfoItem, | |||||
| }; | |||||
| type TouchableOpacityInstance = React.AbstractComponent< | type TouchableOpacityInstance = React.AbstractComponent< | ||||
| React.ElementConfig<typeof TouchableOpacity>, | React.ElementConfig<typeof TouchableOpacity>, | ||||
| NativeMethods, | NativeMethods, | ||||
| >; | >; | ||||
| type BaseProps = { | type BaseProps = { | ||||
| +navigation: AppNavigationProp<'ImageModal'>, | +navigation: AppNavigationProp<'ImageModal'>, | ||||
| +route: NavigationRoute<'ImageModal'>, | +route: NavigationRoute<'ImageModal'>, | ||||
| ▲ Show 20 Lines • Show All 1,139 Lines • Show Last 20 Lines | |||||