Changeset View
Changeset View
Standalone View
Standalone View
native/media/encrypted-image.react.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { MediaCacheContext } from 'lib/components/media-cache-provider.react.js'; | import { MediaCacheContext } from 'lib/components/media-cache-provider.react.js'; | ||||
import { decryptBase64, decryptMedia } from './encryption-utils.js'; | import { decryptBase64, decryptMedia } from './encryption-utils.js'; | ||||
import LoadableImage from './loadable-image.react.js'; | import LoadableImage from './loadable-image.react.js'; | ||||
import { useSelector } from '../redux/redux-utils.js'; | import { useSelector } from '../redux/redux-utils.js'; | ||||
import type { ImageStyle } from '../types/styles.js'; | import type { ImageStyle } from '../types/styles.js'; | ||||
type BaseProps = { | type BaseProps = { | ||||
+holder: string, | +holder: string, | ||||
+encryptionKey: string, | +encryptionKey: string, | ||||
+onLoad: (uri: string) => void, | +onLoad?: (uri: string) => void, | ||||
+spinnerColor: string, | +spinnerColor: string, | ||||
+style: ImageStyle, | +style: ImageStyle, | ||||
+invisibleLoad: boolean, | +invisibleLoad: boolean, | ||||
+thumbHash?: ?string, | +thumbHash?: ?string, | ||||
}; | }; | ||||
type Props = { | type Props = { | ||||
...BaseProps, | ...BaseProps, | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |