Merge branch 'main' into candidate

This commit is contained in:
xmflsct 2022-10-31 20:00:58 +01:00
commit b6b27a821e
7 changed files with 80 additions and 102 deletions

View File

@ -420,7 +420,7 @@ PODS:
- React-Core
- react-native-netinfo (9.3.6):
- React-Core
- react-native-pager-view (6.0.1):
- react-native-pager-view (6.0.2):
- React-Core
- react-native-paste-input (0.5.1):
- React-Core
@ -534,10 +534,10 @@ PODS:
- React-Core
- RNCClipboard (1.11.1):
- React-Core
- RNFastImage (8.6.1):
- RNFastImage (8.6.3):
- React-Core
- SDWebImage (~> 5.13.5)
- SDWebImageWebPCoder (~> 0.9.0)
- SDWebImageWebPCoder (~> 0.9.1)
- RNGestureHandler (2.8.0):
- React-Core
- RNReanimated (2.12.0):
@ -916,7 +916,7 @@ SPEC CHECKSUMS:
react-native-language-detection: 0e43195ad014974f1b7a31b64820eff34a243f2d
react-native-live-text-image-view: 483bacfdba464162b8cf176bba555364f18b584c
react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461
react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca
react-native-pager-view: 592421df0259bf7a7a4fe85b74c24f3f39905605
react-native-paste-input: 183ad7dc224e192719616f4258dde5b548627d08
react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a
react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097
@ -934,7 +934,7 @@ SPEC CHECKSUMS:
ReactCommon: fe7580b9d10f00249facf25659e0ec051320cc8a
RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca
RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd
RNFastImage: 386e5658bdcc109e8f1fe3265884cb35f0b73541
RNFastImage: c74e098cb862b4870c3de0b1096b65c63e492938
RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3
RNReanimated: c3e58924b9418883b0bde9e78c4c957302f02435
RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d

View File

@ -59,7 +59,7 @@
"expo-store-review": "^5.3.0",
"expo-video-thumbnails": "^6.4.0",
"expo-web-browser": "^11.0.0",
"i18next": "^22.0.3",
"i18next": "^22.0.4",
"li": "^1.3.0",
"linkify-it": "^4.0.1",
"lodash": "^4.17.21",
@ -72,7 +72,7 @@
"react-native-base64": "^0.2.1",
"react-native-blurhash": "^1.1.10",
"react-native-context-menu-view": "xmflsct/react-native-context-menu-view",
"react-native-fast-image": "^8.6.1",
"react-native-fast-image": "^8.6.3",
"react-native-feather": "^1.1.2",
"react-native-flash-message": "^0.3.1",
"react-native-gesture-handler": "^2.8.0",
@ -80,9 +80,9 @@
"react-native-image-picker": "^4.10.0",
"react-native-language-detection": "^0.1.0",
"react-native-live-text-image-view": "^0.4.0",
"react-native-pager-view": "^6.0.1",
"react-native-pager-view": "^6.0.2",
"react-native-reanimated": "^2.12.0",
"react-native-reanimated-zoom": "^0.3.1",
"react-native-reanimated-zoom": "^0.3.2",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-share-menu": "^6.0.0",

View File

@ -1,5 +1,5 @@
diff --git a/node_modules/react-native-fast-image/RNFastImage.podspec b/node_modules/react-native-fast-image/RNFastImage.podspec
index db0fada..1aae975 100644
index db0fada..23770b6 100644
--- a/node_modules/react-native-fast-image/RNFastImage.podspec
+++ b/node_modules/react-native-fast-image/RNFastImage.podspec
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
@ -9,7 +9,7 @@ index db0fada..1aae975 100644
- s.dependency 'SDWebImage', '~> 5.11.1'
- s.dependency 'SDWebImageWebPCoder', '~> 0.8.4'
+ s.dependency 'SDWebImage', '~> 5.13.5'
+ s.dependency 'SDWebImageWebPCoder', '~> 0.9.0'
+ s.dependency 'SDWebImageWebPCoder', '~> 0.9.1'
end
diff --git a/node_modules/react-native-fast-image/android/build.gradle b/node_modules/react-native-fast-image/android/build.gradle
index 5b21cd5..19d82f8 100644

View File

@ -1,68 +0,0 @@
diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
index 9b3e4a3..558944d 100644
--- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
+++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
@@ -4,6 +4,7 @@ declare type Props = {
children: React.ReactNode;
minimumZoomScale?: number;
maximumZoomScale?: number;
+ simultaneousGesture?: GestureType;
} & ViewProps;
export declare function Zoom(props: Props): JSX.Element;
export {};
diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
index 2c48163..bc2d3dd 100644
--- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx
+++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
@@ -8,13 +8,18 @@ import Animated, {
cancelAnimation,
runOnJS,
} from 'react-native-reanimated';
-import { Gesture, GestureDetector } from 'react-native-gesture-handler';
+import {
+ Gesture,
+ GestureDetector,
+ GestureType,
+} from 'react-native-gesture-handler';
import { ZoomListContext } from './zoom-list-context';
type Props = {
children: React.ReactNode;
minimumZoomScale?: number;
maximumZoomScale?: number;
+ simultaneousGesture?: GestureType;
} & ViewProps;
export function Zoom(props: Props) {
@@ -23,6 +28,7 @@ export function Zoom(props: Props) {
maximumZoomScale = 8,
style: propStyle,
onLayout,
+ simultaneousGesture,
} = props;
const zoomListContext = useContext(ZoomListContext);
@@ -198,11 +204,21 @@ export function Zoom(props: Props) {
);
}
- return Gesture.Race(doubleTap, Gesture.Simultaneous(pan, pinch));
+ return Gesture.Race(
+ doubleTap,
+ simultaneousGesture
+ ? Gesture.Simultaneous(pan, pinch, simultaneousGesture)
+ : Gesture.Simultaneous(pan, pinch)
+ );
// only add prop dependencies
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [maximumZoomScale, minimumZoomScale, zoomListContext]);
+ }, [
+ maximumZoomScale,
+ minimumZoomScale,
+ zoomListContext,
+ simultaneousGesture,
+ ]);
useDerivedValue(() => {
if (scale.value > 1 && !isZoomed.value) {

View File

@ -0,0 +1,41 @@
diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
index 38fb6f1..e93c288 100644
--- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
+++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts
@@ -6,6 +6,7 @@ declare type Props = {
minimumZoomScale?: number;
maximumZoomScale?: number;
simultaneousGesture?: GestureType;
+ isZoomed?: SharedValue<boolean>;
} & ViewProps;
export declare function Zoom(props: Props): JSX.Element;
export {};
diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
index e07b415..d57a1eb 100644
--- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx
+++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx
@@ -7,6 +7,7 @@ import Animated, {
withTiming,
cancelAnimation,
runOnJS,
+ SharedValue,
} from 'react-native-reanimated';
import {
Gesture,
@@ -20,6 +21,7 @@ type Props = {
minimumZoomScale?: number;
maximumZoomScale?: number;
simultaneousGesture?: GestureType;
+ isZoomed?: SharedValue<boolean>;
} & ViewProps;
export function Zoom(props: Props) {
@@ -39,7 +41,7 @@ export function Zoom(props: Props) {
const originY = useSharedValue(0);
const scale = useSharedValue(1);
const isPinching = useSharedValue(false);
- const isZoomed = useSharedValue(false);
+ const isZoomed = props.isZoomed || useSharedValue(false);
const viewHeight = useSharedValue(0);
const viewWidth = useSharedValue(0);

View File

@ -4,11 +4,12 @@ import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header'
import { useActionSheet } from '@expo/react-native-action-sheet'
import { RootStackScreenProps } from '@utils/navigation/navigators'
import { useTheme } from '@utils/styles/ThemeManager'
import React, { useCallback, useRef, useState } from 'react'
import React, { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import {
Dimensions,
FlatList,
Image,
PixelRatio,
Platform,
Share,
@ -16,10 +17,9 @@ import {
View,
ViewToken
} from 'react-native'
import FlashMessage from 'react-native-flash-message'
import { Directions, Gesture, LongPressGestureHandler } from 'react-native-gesture-handler'
import { LiveTextImageView } from 'react-native-live-text-image-view'
import { runOnJS } from 'react-native-reanimated'
import { runOnJS, useSharedValue } from 'react-native-reanimated'
import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom'
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context'
import saveImage from './ImageViewer/save'
@ -48,8 +48,6 @@ const ScreenImagesViewer = ({
const initialIndex = imageUrls.findIndex(image => image.id === id)
const [currentIndex, setCurrentIndex] = useState(initialIndex)
const messageRef = useRef<FlashMessage>(null)
const { showActionSheetWithOptions } = useActionSheet()
const onPress = useCallback(() => {
analytics('imageviewer_more_press')
@ -85,6 +83,8 @@ const ScreenImagesViewer = ({
)
}, [currentIndex])
const isZoomed = useSharedValue(false)
const renderItem = React.useCallback(
({
item
@ -102,10 +102,15 @@ const ScreenImagesViewer = ({
return (
<Zoom
isZoomed={isZoomed}
maximumZoomScale={max > 8 ? 8 : max}
simultaneousGesture={Gesture.Fling()
.direction(Directions.DOWN)
.onStart(() => runOnJS(navigation.goBack)())}
.onStart(() => {
if (isZoomed.value === false) {
runOnJS(navigation.goBack)()
}
})}
children={
<View
style={{
@ -137,7 +142,7 @@ const ScreenImagesViewer = ({
/>
)
},
[]
[isZoomed.value]
)
const onViewableItemsChanged = useCallback(

View File

@ -4783,10 +4783,10 @@ https-proxy-agent@^5.0.0:
agent-base "6"
debug "4"
i18next@^22.0.3:
version "22.0.3"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.3.tgz#084e40ec88d63c13385175ddebcc4395c89b97e3"
integrity sha512-gG6kCG5+gnPXdK8TLTJ2oiuFSjn6CYMSUwV3vnmISxwTunJHREn/z6gi1g7942c61K1dL3Gm+9a64nZCPv6mlg==
i18next@^22.0.4:
version "22.0.4"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.4.tgz#77d8871687b0ab072b38991e3887187823667e30"
integrity sha512-TOp7BTMKDbUkOHMzDlVsCYWpyaFkKakrrO3HNXfSz4EeJaWwnBScRmgQSTaWHScXVHBUFXTvShrCW8uryBYFcg==
dependencies:
"@babel/runtime" "^7.17.2"
@ -7012,10 +7012,10 @@ react-native-context-menu-view@xmflsct/react-native-context-menu-view:
version "1.5.4"
resolved "https://codeload.github.com/xmflsct/react-native-context-menu-view/tar.gz/bff5773d318970cd67b5cf114d4bec1e200178eb"
react-native-fast-image@^8.6.1:
version "8.6.1"
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.6.1.tgz#6a3a11b8ebc7629919265d33a420a04d13c897e0"
integrity sha512-ILuP7EuakqHNzTr8ZbumhuxG4tE/wGQ66z4nEEuzc0FlqY6rYaPsnq/UD2ahoyFj6QP1WvA2RIK3odib+VcqWg==
react-native-fast-image@^8.6.3:
version "8.6.3"
resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.6.3.tgz#6edc3f9190092a909d636d93eecbcc54a8822255"
integrity sha512-Sdw4ESidXCXOmQ9EcYguNY2swyoWmx53kym2zRsvi+VeFCHEdkO+WG1DK+6W81juot40bbfLNhkc63QnWtesNg==
react-native-feather@^1.1.2:
version "1.1.2"
@ -7074,15 +7074,15 @@ react-native-live-text-image-view@^0.4.0:
resolved "https://registry.yarnpkg.com/react-native-live-text-image-view/-/react-native-live-text-image-view-0.4.0.tgz#d23d5850788609fd1448533213fc6c453c584761"
integrity sha512-PhVFE0YogSLrTlnHIxUWL80CrmbDvxk1JvLx4UHiRHRwLda4dV/e/9Q+Pyh7Vq7qwAPE6vGoN6sjbXNaj4WCew==
react-native-pager-view@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.1.tgz#353abf38d3c2b91ed7c586f10af0f94700f5b1dc"
integrity sha512-kOVNu+4JnR3Gpykviy4WbOAnQz8TgP6O2pRvne221oPUDQLYrvEE/FINR0P85TxbMgvKTPlLejGw0ZHQbezK/g==
react-native-pager-view@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.2.tgz#447b85fcb9f35225c4d6885c18689a7d30c181d9"
integrity sha512-XL3Qc9k7o0BykclGHtuRUz97FpF6rcKbP8LqszLeS2hKnINYcbUPYqg46EhbwVhFOUJE+XhT3idrSO1e/D6jtQ==
react-native-reanimated-zoom@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.1.tgz#f8f7ab088df920e612dce4cd77a2cd772b50bc17"
integrity sha512-/RlmFwfRbRABMWJbZZ51u9wEtDXQ6cR5oM6X9/NAJZhg9KDXzy8Ijt/DYSOsEFMIE2BrZZCY7v/UsM3XdsNdFA==
react-native-reanimated-zoom@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.2.tgz#11ffcf9d518023cca68ac1968ddf836abd4653a4"
integrity sha512-p/IVINRdejc+hXoHIXuC3fl1ewlZLYTXZ9ShjLkEJY8SXa4swFFLWzoERwhJxYhc7D6Mxc5cQOTxpiEp2bAVGw==
react-native-reanimated@^2.12.0:
version "2.12.0"