Skip to content

Commit 96f85a2

Browse files
authored
Merge pull request #276 from sendbird/feat/migrate-zoomable-view-version
feat: update zoomable view dependency and refactor zoomProps handling
2 parents 940823e + 167cee2 commit 96f85a2

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

packages/uikit-react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"access": "public"
6969
},
7070
"dependencies": {
71-
"@openspacelabs/react-native-zoomable-view": "<2.3.0",
71+
"@openspacelabs/react-native-zoomable-view": "^2.3.0",
7272
"@sendbird/uikit-chat-hooks": "3.11.3",
7373
"@sendbird/uikit-react-native-foundation": "3.11.3",
7474
"@sendbird/uikit-tools": "0.0.15",

packages/uikit-react-native/src/components/FileViewer/FileViewerContent.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const FileViewerContent = ({ type, src, topInset = 0, bottomInset = 0, maxZoom =
4545
zoomProps={{
4646
minZoom,
4747
maxZoom,
48-
onTouchEnd: onPress,
48+
onSingleTap: onPress,
4949
}}
5050
/>
5151
);
@@ -85,12 +85,15 @@ const ZoomableImageView = ({
8585
style: StyleProp<ImageStyle>;
8686
resizeMode: ImageProps['resizeMode'];
8787
onLoadEnd: () => void;
88-
zoomProps?: ReactNativeZoomableViewProps;
88+
zoomProps?: Partial<ReactNativeZoomableViewProps>;
8989
}) => {
9090
const { width, height } = useWindowDimensions();
9191

9292
const imageSize = useRef<{ width: number; height: number }>();
93-
const [contentSizeProps, setContentSizeProps] = useState<ReactNativeZoomableViewProps>({
93+
const [contentSizeProps, setContentSizeProps] = useState<{
94+
contentWidth: number;
95+
contentHeight: number;
96+
}>({
9497
contentWidth: width,
9598
contentHeight: height,
9699
});

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3076,10 +3076,10 @@
30763076
dependencies:
30773077
"@octokit/openapi-types" "^18.0.0"
30783078

3079-
"@openspacelabs/react-native-zoomable-view@<2.3.0":
3080-
version "2.2.0"
3081-
resolved "https://registry.yarnpkg.com/@openspacelabs/react-native-zoomable-view/-/react-native-zoomable-view-2.2.0.tgz#14ba1b45f17d07371d02a798fe7ac75d338aaa99"
3082-
integrity sha512-9z86KPvcvI/Y9UrOR31nxnL+INvr8Gq/2faFrBggtb2CAUzv9qjBHrGmTLg2gfvhhxlybb2wQU9bDQ5/GOMScw==
3079+
"@openspacelabs/react-native-zoomable-view@^2.3.0":
3080+
version "2.4.2"
3081+
resolved "https://registry.yarnpkg.com/@openspacelabs/react-native-zoomable-view/-/react-native-zoomable-view-2.4.2.tgz#e3fcea7dd3b6eee5d96b4d199d5810f0098e0896"
3082+
integrity sha512-Rcdldg7Am1y+Iu/Nuc82Ej2Exypeeh0oHpWrnc2SDyNa08A+efNYWOtropcbKWetWv+S6z6VJRsgvuiWug11zg==
30833083
dependencies:
30843084
prop-types "^15.7.2"
30853085

0 commit comments

Comments
 (0)