From 05555c34550fd255e687e739695a55e2c4d5dbcb Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 29 Mar 2022 23:01:20 +0200 Subject: [PATCH 01/36] Roll back pager-view Breaking initial page height --- ios/Podfile.lock | 22 ++++++++++++++++++++-- package.json | 2 +- src/screens/Tabs/Public.tsx | 9 +-------- yarn.lock | 8 ++++---- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 996cb233..d38f5d75 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,6 +1,8 @@ PODS: - boost (1.76.0) - DoubleConversion (1.1.6) + - EXApplication (4.0.2): + - ExpoModulesCore - EXAV (10.2.1): - ExpoModulesCore - ReactCommon/turbomodule/core @@ -21,6 +23,8 @@ PODS: - EXFirebaseCore (4.1.1): - ExpoModulesCore - Firebase/Core (= 7.7.0) + - EXFont (10.0.5): + - ExpoModulesCore - EXImageLoader (3.1.1): - ExpoModulesCore - React-Core @@ -30,6 +34,8 @@ PODS: - EXImagePicker (12.0.2): - ExpoModulesCore - EXJSONUtils (0.2.1) + - EXKeepAwake (10.0.2): + - ExpoModulesCore - EXManifests (0.2.4): - EXJSONUtils - EXNotifications (0.14.1): @@ -373,7 +379,7 @@ PODS: - React-Core - react-native-netinfo (8.2.0): - React-Core - - react-native-pager-view (5.4.15): + - react-native-pager-view (5.4.11): - React-Core - react-native-safe-area-context (4.2.4): - RCT-Folly @@ -508,6 +514,7 @@ PODS: DEPENDENCIES: - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - EXApplication (from `../node_modules/expo-application/ios`) - EXAV (from `../node_modules/expo-av/ios`) - EXConstants (from `../node_modules/expo-constants/ios`) - EXCrypto (from `../node_modules/expo-crypto/ios`) @@ -516,10 +523,12 @@ DEPENDENCIES: - EXFileSystem (from `../node_modules/expo-file-system/ios`) - EXFirebaseAnalytics (from `../node_modules/expo-firebase-analytics/ios`) - EXFirebaseCore (from `../node_modules/expo-firebase-core/ios`) + - EXFont (from `../node_modules/expo-font/ios`) - EXImageLoader (from `../node_modules/expo-image-loader/ios`) - EXImageManipulator (from `../node_modules/expo-image-manipulator/ios`) - EXImagePicker (from `../node_modules/expo-image-picker/ios`) - EXJSONUtils (from `../node_modules/expo-json-utils/ios`) + - EXKeepAwake (from `../node_modules/expo-keep-awake/ios`) - EXManifests (from `../node_modules/expo-manifests/ios`) - EXNotifications (from `../node_modules/expo-notifications/ios`) - Expo (from `../node_modules/expo/ios`) @@ -610,6 +619,8 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" DoubleConversion: :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + EXApplication: + :path: "../node_modules/expo-application/ios" EXAV: :path: "../node_modules/expo-av/ios" EXConstants: @@ -626,6 +637,8 @@ EXTERNAL SOURCES: :path: "../node_modules/expo-firebase-analytics/ios" EXFirebaseCore: :path: "../node_modules/expo-firebase-core/ios" + EXFont: + :path: "../node_modules/expo-font/ios" EXImageLoader: :path: "../node_modules/expo-image-loader/ios" EXImageManipulator: @@ -634,6 +647,8 @@ EXTERNAL SOURCES: :path: "../node_modules/expo-image-picker/ios" EXJSONUtils: :path: "../node_modules/expo-json-utils/ios" + EXKeepAwake: + :path: "../node_modules/expo-keep-awake/ios" EXManifests: :path: "../node_modules/expo-manifests/ios" EXNotifications: @@ -758,6 +773,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 + EXApplication: 54fe5bd6268d697771645e8f1aef8b806a65247a EXAV: b9ed0c201092244c46aa78f907f5c66176bed236 EXConstants: 88bf79622fbd9b476c96d8ec57fe97ca44fe8e3c EXCrypto: ab2ba0df3136a5f2407b8c7e70eb498ac20d704f @@ -766,10 +782,12 @@ SPEC CHECKSUMS: EXFileSystem: 7bcd3c1428698150d5c8ca140c8183f2ee204048 EXFirebaseAnalytics: a7ec2dd1394ad0de5c0c63fac0deee496f798284 EXFirebaseCore: 52151d0b008b99983e6a120cea94466ee760a4e9 + EXFont: 2597c10ac85a69d348d44d7873eccf5a7576ef5e EXImageLoader: 347b72c2ec2df65120ccec40ea65a4c4f24317ff EXImageManipulator: 60d1bf3f1d7709453b1feb38adf8594b7f58710f EXImagePicker: bf4d62532cc2bf217edbe4abbb0014e73e079eac EXJSONUtils: 5ee0d5cf76da70ad86f0be1a41cc70f47d69e06f + EXKeepAwake: bf48d7f740a5cd2befed6cf9a49911d385c6c47d EXManifests: d3464cd2278f4a19cd80c1aa673231570b534c11 EXNotifications: a7d582fa800d77f4a75bd22d52e84e2fbcee26df Expo: 534e51e607aba8229293297da5585f4b26f50fa1 @@ -820,7 +838,7 @@ SPEC CHECKSUMS: react-native-blurhash: 80ed027224075ef708c3cac6ab116e6f8ee3272f react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 react-native-netinfo: e922cb2e3eaf9ccdf16b8d4744a89657377aa4a1 - react-native-pager-view: b1914469643f40042e65d78cbf3d3dfebd6fb0d9 + react-native-pager-view: 7f00d63688f7df9fad86dfb0154814419cc5eb8d react-native-safe-area-context: f98b0b16d1546d208fc293b4661e3f81a895afd9 react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 React-perflogger: 0afaf2f01a47fd0fc368a93bfbb5bd3b26db6e7f diff --git a/package.json b/package.json index f77c29e7..60604cc3 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "react-native-flash-message": "0.2.1", "react-native-gesture-handler": "2.3.2", "react-native-htmlview": "0.16.0", - "react-native-pager-view": "5.4.15", + "react-native-pager-view": "5.4.11", "react-native-reanimated": "2.5.0", "react-native-safe-area-context": "4.2.4", "react-native-screens": "3.13.1", diff --git a/src/screens/Tabs/Public.tsx b/src/screens/Tabs/Public.tsx index 4495a46a..c8b77940 100644 --- a/src/screens/Tabs/Public.tsx +++ b/src/screens/Tabs/Public.tsx @@ -9,13 +9,11 @@ import { TabPublicStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' -import { getInstanceTimelinesLookback } from '@utils/slices/instancesSlice' import { useTheme } from '@utils/styles/ThemeManager' import React, { useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Dimensions, StyleSheet } from 'react-native' +import { Dimensions, StyleSheet, View } from 'react-native' import { TabView } from 'react-native-tab-view' -import { useSelector } from 'react-redux' import TabSharedRoot from './Shared/Root' const Stack = createNativeStackNavigator() @@ -72,10 +70,6 @@ const TabPublic = React.memo( const routes = pages.map(p => ({ key: p.key })) - const timelinesLookback = useSelector( - getInstanceTimelinesLookback, - () => true - ) const renderScene = useCallback( ({ route: { key: page } @@ -101,7 +95,6 @@ const TabPublic = React.memo( ) const children = useCallback( () => ( - // @ts-ignore Date: Sat, 2 Apr 2022 04:13:44 +0200 Subject: [PATCH 02/36] New translations timeline.json (Vietnamese) --- src/i18n/vi/components/timeline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index a1eb9053..bc9bd869 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -71,7 +71,7 @@ }, "avatar": { "accessibilityLabel": "Ảnh đại diện của {{name}}", - "accessibilityHint": "Đến trang cá nhân {{name}}" + "accessibilityHint": "Đến trang của {{name}}" }, "content": { "expandHint": "nội dung ẩn" From 55e775eaeb534c790fb8d420e4b8ded360b02e98 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 5 Apr 2022 06:58:14 +0200 Subject: [PATCH 03/36] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index 561d1b2e..abb14bad 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -38,10 +38,10 @@ "name": "Nhắn riêng" }, "favourites": { - "name": "Lượt thích" + "name": "Đã thích" }, "fontSize": { - "name": "Kích cỡ phông chữ" + "name": "Cỡ chữ" }, "lists": { "name": "Danh sách" @@ -53,7 +53,7 @@ "name": "Thông báo đẩy" }, "profile": { - "name": "Cài đặt cá nhân" + "name": "Sửa hồ sơ" }, "profileName": { "name": "Tên hiển thị mới" @@ -270,7 +270,7 @@ "version": "Phiên bản {{version}}" }, "switch": { - "existing": "Đã đăng nhập trước đó", + "existing": "Đã đăng nhập trước đây", "new": "Đăng nhập máy chủ" } }, @@ -320,7 +320,7 @@ "notFound": "Không tìm thấy {{type}} {{searchTerm}}" }, "toot": { - "name": "Thảo luận" + "name": "Nội dung tút" }, "users": { "accounts": { From a4373471c5b2eaefbc7a5b3885cc8bcb6c03c712 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 5 Apr 2022 07:59:52 +0200 Subject: [PATCH 04/36] New translations instance.json (Vietnamese) --- src/i18n/vi/components/instance.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/vi/components/instance.json b/src/i18n/vi/components/instance.json index 52931919..ee773025 100644 --- a/src/i18n/vi/components/instance.json +++ b/src/i18n/vi/components/instance.json @@ -5,7 +5,7 @@ }, "button": "Đăng nhập", "information": { - "name": "Tên", + "name": "Tên máy chủ", "accounts": "Người dùng", "statuses": "Tút", "domains": "Liên hợp" From a9b374302ae2ee800c7bfbf8145eaa7c92ee42a8 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 5 Apr 2022 07:59:53 +0200 Subject: [PATCH 05/36] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index abb14bad..de4365ae 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -75,8 +75,8 @@ } }, "fontSize": { - "showcase": "Kết quả", - "demo": "

Đây là một tút mẫu 😊 Bạn có thể chọn một trong nhiều lựa chọn bên dưới.

Tùy chọn này chỉ áp dụng cho nội dung tút chứ không thay đổi những phần khác của app.

", + "showcase": "Xem trước", + "demo": "

Đây là một tút mẫu 😊 Bạn có thể chọn một trong nhiều lựa chọn bên dưới.

Tùy chọn này chỉ áp dụng cho nội dung tút chứ không ảnh hưởng những phần tử khác của app.

", "availableSizes": "Kích cỡ", "sizes": { "S": "S", From bd22379d2cf33a8ea691e29f00ca4000542a837e Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 5 Apr 2022 22:14:13 +0200 Subject: [PATCH 06/36] Bump packages --- ios/Podfile.lock | 8 +-- package.json | 20 +++--- yarn.lock | 154 +++++++++++++++++++++++++++++++---------------- 3 files changed, 117 insertions(+), 65 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d38f5d75..8cc2e7f4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -454,7 +454,7 @@ PODS: - React-jsi (= 0.67.4) - React-logger (= 0.67.4) - React-perflogger (= 0.67.4) - - RNCAsyncStorage (1.17.0): + - RNCAsyncStorage (1.17.3): - React-Core - RNFastImage (8.5.11): - React-Core @@ -493,7 +493,7 @@ PODS: - RNScreens (3.13.1): - React-Core - React-RCTImage - - RNSentry (3.3.6): + - RNSentry (3.4.0): - React-Core - Sentry (= 7.11.0) - RNSVG (12.3.0): @@ -853,12 +853,12 @@ SPEC CHECKSUMS: React-RCTVibration: 3b52a7dced19cdb025b4f88ab26ceb2d85f30ba2 React-runtimeexecutor: a9d3c82ddf7ffdad9fbe6a81c6d6f8c06385464d ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e - RNCAsyncStorage: 4efdcd2f7378421b29467c9de58f43552b60cf5b + RNCAsyncStorage: 005c0e2f09575360f142d0d1f1f15e4ec575b1af RNFastImage: cced864a4a2eac27c5c10ac16bd5e8b9d2be4504 RNGestureHandler: 6e757e487a4834e7280e98e9bac66d2d9c575e9c RNReanimated: 190b6930d5d94832061278e1070bbe313e50c830 RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 - RNSentry: 6fbe6a4194cf632e5dc02a640741512faa943dbf + RNSentry: ec3c033c13bcb65c79f19d54ca54c514d1832bb5 RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815 diff --git a/package.json b/package.json index 60604cc3..f4de7f6a 100644 --- a/package.json +++ b/package.json @@ -27,17 +27,17 @@ "dependencies": { "@expo/react-native-action-sheet": "3.13.0", "@neverdull-agency/expo-unlimited-secure-store": "1.0.10", - "@react-native-async-storage/async-storage": "1.17.0", + "@react-native-async-storage/async-storage": "1.17.3", "@react-native-community/blur": "3.6.0", "@react-native-community/cameraroll": "4.1.2", "@react-native-community/netinfo": "8.2.0", "@react-native-community/segmented-control": "2.2.2", - "@react-navigation/bottom-tabs": "6.2.0", - "@react-navigation/native": "6.0.8", - "@react-navigation/native-stack": "6.5.2", - "@react-navigation/stack": "6.1.1", - "@reduxjs/toolkit": "1.8.0", - "@sentry/react-native": "3.3.6", + "@react-navigation/bottom-tabs": "6.3.1", + "@react-navigation/native": "6.0.10", + "@react-navigation/native-stack": "6.6.1", + "@react-navigation/stack": "6.2.1", + "@reduxjs/toolkit": "1.8.1", + "@sentry/react-native": "3.4.0", "@sharcoux/slider": "5.6.5", "axios": "0.26.1", "expo": "44.0.6", @@ -85,11 +85,11 @@ "react-native-swipe-list-view": "3.2.9", "react-native-tab-view": "3.1.1", "react-query": "3.34.19", - "react-redux": "7.2.6", + "react-redux": "7.2.8", "react-timeago": "6.2.1", "redux-persist": "6.0.0", "rn-placeholder": "3.0.3", - "sentry-expo": "4.1.0", + "sentry-expo": "4.1.1", "tslib": "2.3.1", "valid-url": "1.0.9" }, @@ -98,7 +98,7 @@ "@babel/plugin-proposal-optional-chaining": "7.16.7", "@babel/preset-typescript": "7.16.7", "@expo/config": "6.0.19", - "@types/lodash": "4.14.180", + "@types/lodash": "4.14.181", "@types/react": "17.0.43", "@types/react-dom": "17.0.14", "@types/react-native": "0.67.3", diff --git a/yarn.lock b/yarn.lock index aa846e51..07549088 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1423,10 +1423,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@react-native-async-storage/async-storage@1.17.0": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.17.0.tgz#6666e980af590d77f017065982ead74c1420f93a" - integrity sha512-Kr6HOHbLOZjFXnLwT9c9i1Nwb96Zj7D/bwhrJg+L4b3BCR4DlvJhUQ8gBbc45JiTOiU6SMn/1KS7MDuOjIhCzA== +"@react-native-async-storage/async-storage@1.17.3": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.17.3.tgz#fa7010aa9b6a811ff653df3698a90d3c173dd6a6" + integrity sha512-2dxdlGwBjBP2qYu6F72U7cRRFshISYiNEWCaQNOJtxUERCMaYRWcniYqhL248KSbGUMpRhFCEtliztsiGoYYMA== dependencies: merge-options "^3.0.4" @@ -1604,19 +1604,19 @@ resolved "https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa" integrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ== -"@react-navigation/bottom-tabs@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-6.2.0.tgz#8f6b650c2d05fa63ac42d5e662aece9e554d7a38" - integrity sha512-MNwXbybjapRFZJtO+fNu5YuTYQGzzYAUIF4IsY2+ZBXoCRpzuDq8gXV7ChKDJaaTeX39IoDUng3qGXbvtVcivA== +"@react-navigation/bottom-tabs@6.3.1": + version "6.3.1" + resolved "https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-6.3.1.tgz#1552ccdb789b6c9fc05af0877f8f3a50ab28870c" + integrity sha512-sL9F4WMhhR6I9bE7bpsPVHnK1cN9doaFHAuy5YmD+Sw6OyO0TAmNgQFx4xZWqboA5ZwSkN0tWcRCr6wGXaRRag== dependencies: - "@react-navigation/elements" "^1.3.1" + "@react-navigation/elements" "^1.3.3" color "^3.1.3" warn-once "^0.1.0" -"@react-navigation/core@^6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.1.1.tgz#47b01d0263e413164431c886267a5139e093c706" - integrity sha512-njysuiqztgvR1Z9Noxk2OGJfYtFGFDRyji5Vmm1jHzlql0m+q0wh1dUiyaIEtTyrhFXr/YNgdrKuiPaU9Jp8OA== +"@react-navigation/core@^6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@react-navigation/core/-/core-6.2.1.tgz#90459f9afd25b71a9471b0706ebea2cdd2534fc4" + integrity sha512-3mjS6ujwGnPA/BC11DN9c2c42gFld6B6dQBgDedxP2djceXESpY2kVTTwISDHuqFnF7WjvRjsrDu3cKBX+JosA== dependencies: "@react-navigation/routers" "^6.1.0" escape-string-regexp "^4.0.0" @@ -1624,25 +1624,25 @@ query-string "^7.0.0" react-is "^16.13.0" -"@react-navigation/elements@^1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.1.tgz#aacb08fe0ca4db50f0ed16b72906869ce770edf4" - integrity sha512-jIDRJaG8YPIinl4hZXJu/W3TnhDe8hLYmGSEdL1mxZ1aoNMiApCBYkgTy11oq0EfK/koZd3DPSkJNbzBAQmPJw== +"@react-navigation/elements@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.3.tgz#9f56b650a9a1a8263a271628be7342c8121d1788" + integrity sha512-Lv2lR7si5gNME8dRsqz57d54m4FJtrwHRjNQLOyQO546ZxO+g864cSvoLC6hQedQU0+IJnPTsZiEI2hHqfpEpw== -"@react-navigation/native-stack@6.5.2": - version "6.5.2" - resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.5.2.tgz#1e2dd25c1d5e3664898488008b64b190583b5623" - integrity sha512-aKnjDEljGPDbL8VflCRGVJ2SPD/6x5yuAWsxd1ouCuD+43clkMnz1e0piNf+t3EpNYIWdBNR66Xa+7U/UB4y3w== +"@react-navigation/native-stack@6.6.1": + version "6.6.1" + resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.6.1.tgz#b0fc0dfc6fb21704062ec2820a53f982584feef2" + integrity sha512-JQfM3VWTH241ZQhp+UDJ6dZ/WiKJpGxNO4NFNW9AT+D1mxA3GFC3BBiGZfacPrtMOlLmn9FHf0Kh5rD9JYlvhg== dependencies: - "@react-navigation/elements" "^1.3.1" + "@react-navigation/elements" "^1.3.3" warn-once "^0.1.0" -"@react-navigation/native@6.0.8": - version "6.0.8" - resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.8.tgz#66f48ad2b3fb1acd08c8d935d9f342a3d77ee6cd" - integrity sha512-6022M3+Btok3xJC/49B88er3SRrlDAZ4FdmGndhEVvBcGSHWmscU2qKCwFd0RY6A0AGCVmdIlXudrfdcdRAkpQ== +"@react-navigation/native@6.0.10": + version "6.0.10" + resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.10.tgz#c58aa176eb0e63f3641c83a65c509faf253e4385" + integrity sha512-H6QhLeiieGxNcAJismIDXIPZgf1myr7Og8v116tezIGmincJTOcWavTd7lPHGnMMXaZg94LlVtbaBRIx9cexqw== dependencies: - "@react-navigation/core" "^6.1.1" + "@react-navigation/core" "^6.2.1" escape-string-regexp "^4.0.0" fast-deep-equal "^3.1.3" nanoid "^3.1.23" @@ -1654,19 +1654,19 @@ dependencies: nanoid "^3.1.23" -"@react-navigation/stack@6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.1.1.tgz#eb0dd2f5dec01b9322b7cea8767cb1e408365124" - integrity sha512-mr7CrP3rvYapTZj/xUInJYDte2QEQPvK8qBI6kbJ6goeLqRMkcO7haK4Q5FeV1HVYCUnssAn7CA5j+OOm59syg== +"@react-navigation/stack@6.2.1": + version "6.2.1" + resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.2.1.tgz#2b14473579eced6def5cca06860044d60e59d06e" + integrity sha512-JI7boxtPAMCBXi4VJHVEq61jLVHFW5f3npvbndS+XfOsv7Gf0f91HOVJ28DS5c2Fn4+CO4AByjUozzlN296X+A== dependencies: - "@react-navigation/elements" "^1.3.1" + "@react-navigation/elements" "^1.3.3" color "^3.1.3" warn-once "^0.1.0" -"@reduxjs/toolkit@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.8.0.tgz#8ae875e481ed97e4a691aafa034f876bfd0413c4" - integrity sha512-cdfHWfcvLyhBUDicoFwG1u32JqvwKDxLxDd7zSmSoFw/RhYLOygIRtmaMjPRUUHmVmmAGAvquLLsKKU/677kSQ== +"@reduxjs/toolkit@1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.8.1.tgz#94ee1981b8cf9227cda40163a04704a9544c9a9f" + integrity sha512-Q6mzbTpO9nOYRnkwpDlFOAbQnd3g7zj7CtHAZWz5SzE5lcV97Tf8f3SzOO8BoPOMYBFgfZaqTUZqgGu+a0+Fng== dependencies: immer "^9.0.7" redux "^4.1.2" @@ -1683,7 +1683,7 @@ "@sentry/utils" "6.17.9" tslib "^1.9.3" -"@sentry/browser@^6.12.0": +"@sentry/browser@6.19.2", "@sentry/browser@^6.12.0": version "6.19.2" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-6.19.2.tgz#c0f6df07584f3b36fa037067aea20b2c8c2095a3" integrity sha512-5VC44p5Vu2eJhVT39nLAJFgha5MjHDYCyZRR1ieeZt3a++otojPGBBAKNAtrEMGV+A2Z9AoneD6ZnDVlyb3GKg== @@ -1706,6 +1706,19 @@ proxy-from-env "^1.1.0" which "^2.0.2" +"@sentry/cli@^1.74.2": + version "1.74.3" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-1.74.3.tgz#8405a19f6bb21b2ff3d051fb8a18056cc796c5ae" + integrity sha512-74NiqWTgTFDPe2S99h1ge5UMe6aAC44ebareadd1P6MdaNfYz6JUEa2QrDfMq7TKccEiRFXhXBHbUI8mxzrzuQ== + dependencies: + https-proxy-agent "^5.0.0" + mkdirp "^0.5.5" + node-fetch "^2.6.7" + npmlog "^4.1.2" + progress "^2.0.3" + proxy-from-env "^1.1.0" + which "^2.0.2" + "@sentry/core@6.17.9": version "6.17.9" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-6.17.9.tgz#1c09f1f101207952566349a1921d46db670c8f62" @@ -1756,7 +1769,7 @@ localforage "^1.8.1" tslib "^1.9.3" -"@sentry/integrations@^6.12.0": +"@sentry/integrations@6.19.2", "@sentry/integrations@^6.12.0": version "6.19.2" resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.19.2.tgz#d5abcab94ae23ada097eb454c269e9ab573e14bb" integrity sha512-RjkZXPrtrM+lJVEa4OpZ9CYjJdkpPoWslEQzLMvbaRpURpHFqmABGtXRAnJRYKmy6h7/9q9sABcDgCD4OZw11g== @@ -1784,7 +1797,23 @@ "@sentry/types" "6.19.2" tslib "^1.9.3" -"@sentry/react-native@3.3.6", "@sentry/react-native@^3.1.1": +"@sentry/react-native@3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-3.4.0.tgz#6887b1f86c06368da63004de4bd5d7a5e1f2d870" + integrity sha512-2cABpCxu3vE0Khr3qiOUUAosRmYC1Q6K9VQIXs0g0bsiCptPzb0zVhnaYrUVDxPWlMgoGTTDxhvxTyk3IjJITA== + dependencies: + "@sentry/browser" "6.19.2" + "@sentry/cli" "^1.74.2" + "@sentry/core" "6.19.2" + "@sentry/hub" "6.19.2" + "@sentry/integrations" "6.19.2" + "@sentry/react" "6.19.2" + "@sentry/tracing" "6.19.2" + "@sentry/types" "6.19.2" + "@sentry/utils" "6.19.2" + "@sentry/wizard" "^1.2.17" + +"@sentry/react-native@^3.1.1": version "3.3.6" resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-3.3.6.tgz#0e172fad18ecd5efc03f57f6ed14ffbfb7d0d834" integrity sha512-VLhYzWdS5u3kesJ2b+pyyA0AMr2ihlRojMj2NsMGNr0pHNMI51aWSe9WnvrfQ7bzOoPlSEHAsDH2td86ZEP8rg== @@ -1812,6 +1841,18 @@ hoist-non-react-statics "^3.3.2" tslib "^1.9.3" +"@sentry/react@6.19.2": + version "6.19.2" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-6.19.2.tgz#67760aed06d7e54a2e117cd9048ad19d573c78f1" + integrity sha512-6ffifcUWJegvC5iYJlXL3zBirR05F/i5nA7QaYSMERJqZpXuYhwNPySbuiNTajm64+HA1RbdQkiwrHE/Ur3f1w== + dependencies: + "@sentry/browser" "6.19.2" + "@sentry/minimal" "6.19.2" + "@sentry/types" "6.19.2" + "@sentry/utils" "6.19.2" + hoist-non-react-statics "^3.3.2" + tslib "^1.9.3" + "@sentry/tracing@6.17.9": version "6.17.9" resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.17.9.tgz#d4a6d96d88f10c9cd496e5b32f44d6e67d4c5dc7" @@ -1823,6 +1864,17 @@ "@sentry/utils" "6.17.9" tslib "^1.9.3" +"@sentry/tracing@6.19.2": + version "6.19.2" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-6.19.2.tgz#ed6ff1bc901c4d79ef97f77ed54ce58c650e4915" + integrity sha512-rGoPpP1JIAxdq5bzrww0XuNVr6yn7RN6/wUcaxf6CAvklKvDx+q28WTGlZLGTZ/3un8Rv6i1FZFZOXizgnVnrg== + dependencies: + "@sentry/hub" "6.19.2" + "@sentry/minimal" "6.19.2" + "@sentry/types" "6.19.2" + "@sentry/utils" "6.19.2" + tslib "^1.9.3" + "@sentry/types@6.17.9": version "6.17.9" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.17.9.tgz#d579c33cde0301adaf8ff4762479ad017bf0dffa" @@ -1932,10 +1984,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/lodash@4.14.180": - version "4.14.180" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.180.tgz#4ab7c9ddfc92ec4a887886483bc14c79fb380670" - integrity sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g== +"@types/lodash@4.14.181": + version "4.14.181" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.181.tgz#d1d3740c379fda17ab175165ba04e2d03389385d" + integrity sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag== "@types/node@*": version "17.0.23" @@ -6188,10 +6240,10 @@ react-query@3.34.19: broadcast-channel "^3.4.1" match-sorter "^6.0.2" -react-redux@7.2.6: - version "7.2.6" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.6.tgz#49633a24fe552b5f9caf58feb8a138936ddfe9aa" - integrity sha512-10RPdsz0UUrRL1NZE0ejTkucnclYSgXp5q+tB5SWx2qeG2ZJQJyymgAhwKy73yiL/13btfB6fPr+rgbMAaZIAQ== +react-redux@7.2.8: + version "7.2.8" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" + integrity sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw== dependencies: "@babel/runtime" "^7.15.4" "@types/react-redux" "^7.1.20" @@ -6569,10 +6621,10 @@ send@0.18.0: range-parser "~1.2.1" statuses "2.0.1" -sentry-expo@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/sentry-expo/-/sentry-expo-4.1.0.tgz#c107377e458b82a1b5a29056ede3fed348c8cac6" - integrity sha512-37GuQMnNdUVFP8zoCr6coDkKaz9gnmPDPVKNeOL1X5Zb0NWB/scfvvZ4disHcbqaC51/z0CKZbtmDVIqu708TQ== +sentry-expo@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/sentry-expo/-/sentry-expo-4.1.1.tgz#ff0f494e191a3c43f94043e26ffa18aa4b6059c6" + integrity sha512-Nc9w5znsIBUYZ/rpM1uDEeS2KKc1f+tK4FJ8pA0emJjpBQO4cDJHXb0zyDtFYN7T1+vdEZ0cSe7kwgoPSw5V6g== dependencies: "@expo/config-plugins" "^2.0.2" "@expo/config-types" "^41.0.0" From 86b3661c7421305b8d89026c8eba0f9a0242ae5a Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 5 Apr 2022 22:29:10 +0200 Subject: [PATCH 07/36] Update packages --- ios/Podfile.lock | 5 ++--- package.json | 4 ++-- yarn.lock | 36 ++++++++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8cc2e7f4..3d477d26 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -462,7 +462,7 @@ PODS: - SDWebImageWebPCoder (~> 0.8.4) - RNGestureHandler (2.3.2): - React-Core - - RNReanimated (2.5.0): + - RNReanimated (2.6.0): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -470,7 +470,6 @@ PODS: - RCT-Folly - RCTRequired - RCTTypeSafety - - React - React-callinvoker - React-Core - React-Core/DevSupport @@ -856,7 +855,7 @@ SPEC CHECKSUMS: RNCAsyncStorage: 005c0e2f09575360f142d0d1f1f15e4ec575b1af RNFastImage: cced864a4a2eac27c5c10ac16bd5e8b9d2be4504 RNGestureHandler: 6e757e487a4834e7280e98e9bac66d2d9c575e9c - RNReanimated: 190b6930d5d94832061278e1070bbe313e50c830 + RNReanimated: 2cdfe6a706d512bfa721da47b769410e8fdf516b RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 RNSentry: ec3c033c13bcb65c79f19d54ca54c514d1832bb5 RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 diff --git a/package.json b/package.json index f4de7f6a..4d4a25ac 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "react-native-gesture-handler": "2.3.2", "react-native-htmlview": "0.16.0", "react-native-pager-view": "5.4.11", - "react-native-reanimated": "2.5.0", + "react-native-reanimated": "2.6.0", "react-native-safe-area-context": "4.2.4", "react-native-screens": "3.13.1", "react-native-svg": "12.3.0", @@ -106,7 +106,7 @@ "@types/react-redux": "7.1.23", "@types/react-timeago": "4.1.3", "@types/valid-url": "1.0.3", - "@welldone-software/why-did-you-render": "6.2.3", + "@welldone-software/why-did-you-render": "7.0.1", "babel-plugin-module-resolver": "4.1.0", "babel-plugin-transform-remove-console": "6.9.4", "chalk": "4.1.2", diff --git a/yarn.lock b/yarn.lock index 07549088..d397ea8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2073,10 +2073,10 @@ dependencies: "@types/yargs-parser" "*" -"@welldone-software/why-did-you-render@6.2.3": - version "6.2.3" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.3.tgz#cdd5e27cf25b7e767c1c0b0e8808f67d3f6be833" - integrity sha512-FQgi90jvC9uw2aALlonJfqaWOvU5UUBBVvdAnS2iryXwCc4YJkKsPJY5Y/LzaND3OIyk8XGUn1vTRn6hcem28Q== +"@welldone-software/why-did-you-render@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-7.0.1.tgz#09f487d84844bd8e66435843c2e0305702e61efb" + integrity sha512-Qe/8Xxa2G+LMdI6VoazescPzjjkHYduCDa8aHOJR50e9Bgs8ihkfMBY+ev7B4oc3N59Zm547Sgjf8h5y0FOyoA== dependencies: lodash "^4" @@ -2481,6 +2481,13 @@ bplist-parser@0.3.0: dependencies: big-integer "1.6.x" +bplist-parser@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/bplist-parser/-/bplist-parser-0.3.1.tgz#e1c90b2ca2a9f9474cc72f6862bbf3fee8341fd1" + integrity sha512-PyJxiNtA5T2PlLIeBot4lbp7rj4OadzjnMZD/G5zuBNt8ei/yCU7+wW0h2bag9vr8c+/WuRWmSxbqAl9hL1rBA== + dependencies: + big-integer "1.6.x" + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -5882,7 +5889,7 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -plist@^3.0.2, plist@^3.0.4: +plist@^3.0.2, plist@^3.0.4, plist@^3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.5.tgz#2cbeb52d10e3cdccccf0c11a63a85d830970a987" integrity sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA== @@ -6151,10 +6158,10 @@ react-native-pager-view@5.4.11: resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-5.4.11.tgz#677540293c7b4e0e022efb45727ef9b4efa35409" integrity sha512-4QlBL5W8yVjeYwrw89oCdABI7sDxIGapFQvIbukfB5mAj1Zn1IQPkBqROLblNFtQ8PbAeexXRgDT1ENWygiJ7A== -react-native-reanimated@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.5.0.tgz#315de3a23269afd150df5359252e62937a1a8068" - integrity sha512-P4v6364AKuKkHOAbsXKe0lta2EkhID8OqZoIYGhjbJF67bt7l6fktSTrVyaxkpMHFngzlvVYWFDqFSIQvwu6WA== +react-native-reanimated@2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.6.0.tgz#500497339bec2d18fd4979dc07c831997c9aee82" + integrity sha512-TG7u0d1iTx6BRQXhUp9DKEW/9K6169qiX9vweC+qOcVffGSZvjDZ+OyyI0faXIDvcf5LRHAud3mNtO3ANaHRhQ== dependencies: "@babel/plugin-transform-object-assign" "^7.16.7" "@types/invariant" "^2.2.35" @@ -6736,7 +6743,16 @@ signal-exit@^3.0.0, signal-exit@^3.0.2: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== -simple-plist@^1.0.0, simple-plist@^1.1.0: +simple-plist@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.1.tgz#16e1d8f62c6c9b691b8383127663d834112fb017" + integrity sha512-iMSw5i0XseMnrhtIzRb7XpQEXepa9xhWxGUojHBL43SIpQuDQkh3Wpy67ZbDzZVr6EKxvwVChnVpdl8hEVLDiw== + dependencies: + bplist-creator "0.1.0" + bplist-parser "0.3.1" + plist "^3.0.5" + +simple-plist@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/simple-plist/-/simple-plist-1.3.0.tgz#f451997663eafd8ea6bad353a01caf49ef186d43" integrity sha512-uYWpeGFtZtVt2NhG4AHgpwx323zxD85x42heMJBan1qAiqqozIlaGrwrEt6kRjXWRWIXsuV1VLCvVmZan2B5dg== From 8aeb32fd618e45e791ef6dd10cb6b2ba18db9ce8 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 5 Apr 2022 22:51:18 +0200 Subject: [PATCH 08/36] Bump SDWebImage --- ios/Podfile.lock | 4 ++-- patches/react-native-fast-image+8.5.11.patch | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 3d477d26..c5fa1723 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -458,7 +458,7 @@ PODS: - React-Core - RNFastImage (8.5.11): - React-Core - - SDWebImage (~> 5.12.3) + - SDWebImage (~> 5.12.5) - SDWebImageWebPCoder (~> 0.8.4) - RNGestureHandler (2.3.2): - React-Core @@ -853,7 +853,7 @@ SPEC CHECKSUMS: React-runtimeexecutor: a9d3c82ddf7ffdad9fbe6a81c6d6f8c06385464d ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e RNCAsyncStorage: 005c0e2f09575360f142d0d1f1f15e4ec575b1af - RNFastImage: cced864a4a2eac27c5c10ac16bd5e8b9d2be4504 + RNFastImage: 945abf54742505d790d9024d230c69b1e866bc88 RNGestureHandler: 6e757e487a4834e7280e98e9bac66d2d9c575e9c RNReanimated: 2cdfe6a706d512bfa721da47b769410e8fdf516b RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 diff --git a/patches/react-native-fast-image+8.5.11.patch b/patches/react-native-fast-image+8.5.11.patch index 3d5f42e9..1c11bf6d 100644 --- a/patches/react-native-fast-image+8.5.11.patch +++ b/patches/react-native-fast-image+8.5.11.patch @@ -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..9a2457c 100644 +index db0fada..54d8d5b 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| @@ -7,7 +7,7 @@ index db0fada..9a2457c 100644 s.dependency 'React-Core' - s.dependency 'SDWebImage', '~> 5.11.1' -+ s.dependency 'SDWebImage', '~> 5.12.3' ++ s.dependency 'SDWebImage', '~> 5.12.5' s.dependency 'SDWebImageWebPCoder', '~> 0.8.4' end diff --git a/node_modules/react-native-fast-image/android/build.gradle b/node_modules/react-native-fast-image/android/build.gradle From 1995f32dfde25fe7f50b78cf6c8d38c4c230ee95 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Thu, 28 Apr 2022 21:53:52 +0200 Subject: [PATCH 09/36] Bump packages --- ios/Podfile.lock | 24 ++-- package.json | 35 +++-- yarn.lock | 347 +++++++++++++++++++++++++++++++++++------------ 3 files changed, 289 insertions(+), 117 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index c5fa1723..ca3977a7 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -373,15 +373,15 @@ PODS: - glog - react-native-blur (0.8.0): - React - - react-native-blurhash (1.1.9): + - react-native-blurhash (1.1.10): - React-Core - react-native-cameraroll (4.1.2): - React-Core - - react-native-netinfo (8.2.0): + - react-native-netinfo (8.3.0): - React-Core - react-native-pager-view (5.4.11): - React-Core - - react-native-safe-area-context (4.2.4): + - react-native-safe-area-context (4.2.5): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -460,9 +460,9 @@ PODS: - React-Core - SDWebImage (~> 5.12.5) - SDWebImageWebPCoder (~> 0.8.4) - - RNGestureHandler (2.3.2): + - RNGestureHandler (2.4.1): - React-Core - - RNReanimated (2.6.0): + - RNReanimated (2.8.0): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -492,7 +492,7 @@ PODS: - RNScreens (3.13.1): - React-Core - React-RCTImage - - RNSentry (3.4.0): + - RNSentry (3.4.1): - React-Core - Sentry (= 7.11.0) - RNSVG (12.3.0): @@ -834,11 +834,11 @@ SPEC CHECKSUMS: React-jsinspector: f4775ea9118cbe1f72b834f0f842baa7a99508d8 React-logger: a1f028f6d8639a3f364ef80419e5e862e1115250 react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c - react-native-blurhash: 80ed027224075ef708c3cac6ab116e6f8ee3272f + react-native-blurhash: add4df9a937b4e021a24bc67a0714f13e0bd40b7 react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 - react-native-netinfo: e922cb2e3eaf9ccdf16b8d4744a89657377aa4a1 + react-native-netinfo: 3671b091c4843fda5e153612866ef4024b8f5d62 react-native-pager-view: 7f00d63688f7df9fad86dfb0154814419cc5eb8d - react-native-safe-area-context: f98b0b16d1546d208fc293b4661e3f81a895afd9 + react-native-safe-area-context: ebf8c413eb8b5f7c392a036a315eb7b46b96845f react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 React-perflogger: 0afaf2f01a47fd0fc368a93bfbb5bd3b26db6e7f React-RCTActionSheet: 59f35c4029e0b532fc42114241a06e170b7431a2 @@ -854,10 +854,10 @@ SPEC CHECKSUMS: ReactCommon: 07d0c460b9ba9af3eaf1b8f5abe7daaad28c9c4e RNCAsyncStorage: 005c0e2f09575360f142d0d1f1f15e4ec575b1af RNFastImage: 945abf54742505d790d9024d230c69b1e866bc88 - RNGestureHandler: 6e757e487a4834e7280e98e9bac66d2d9c575e9c - RNReanimated: 2cdfe6a706d512bfa721da47b769410e8fdf516b + RNGestureHandler: 4f4986408310a43f1606c391f38f76e0d6e790d5 + RNReanimated: 46cdb89ca59ab7181334f4ed05a70e82ddb36751 RNScreens: 40a2cb40a02a609938137a1e0acfbf8fc9eebf19 - RNSentry: ec3c033c13bcb65c79f19d54ca54c514d1832bb5 + RNSentry: fbbdcd7213058e3de5fbaa452b25a06a16b4b382 RNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8 SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815 diff --git a/package.json b/package.json index 4d4a25ac..a0ea509c 100644 --- a/package.json +++ b/package.json @@ -30,16 +30,16 @@ "@react-native-async-storage/async-storage": "1.17.3", "@react-native-community/blur": "3.6.0", "@react-native-community/cameraroll": "4.1.2", - "@react-native-community/netinfo": "8.2.0", + "@react-native-community/netinfo": "8.3.0", "@react-native-community/segmented-control": "2.2.2", "@react-navigation/bottom-tabs": "6.3.1", "@react-navigation/native": "6.0.10", - "@react-navigation/native-stack": "6.6.1", + "@react-navigation/native-stack": "6.6.2", "@react-navigation/stack": "6.2.1", "@reduxjs/toolkit": "1.8.1", - "@sentry/react-native": "3.4.0", - "@sharcoux/slider": "5.6.5", - "axios": "0.26.1", + "@sentry/react-native": "3.4.1", + "@sharcoux/slider": "6.0.2", + "axios": "0.27.2", "expo": "44.0.6", "expo-auth-session": "3.5.0", "expo-av": "10.2.1", @@ -67,43 +67,42 @@ "lodash": "4.17.21", "react": "17.0.2", "react-dom": "17.0.2", - "react-i18next": "11.16.2", + "react-i18next": "11.16.7", "react-native": "0.67.4", "react-native-animated-spinkit": "1.5.2", "react-native-base64": "^0.2.1", - "react-native-blurhash": "1.1.9", + "react-native-blurhash": "1.1.10", "react-native-fast-image": "8.5.11", "react-native-feather": "1.1.2", "react-native-flash-message": "0.2.1", - "react-native-gesture-handler": "2.3.2", + "react-native-gesture-handler": "2.4.1", "react-native-htmlview": "0.16.0", "react-native-pager-view": "5.4.11", - "react-native-reanimated": "2.6.0", - "react-native-safe-area-context": "4.2.4", + "react-native-reanimated": "2.8.0", + "react-native-safe-area-context": "4.2.5", "react-native-screens": "3.13.1", "react-native-svg": "12.3.0", "react-native-swipe-list-view": "3.2.9", "react-native-tab-view": "3.1.1", - "react-query": "3.34.19", - "react-redux": "7.2.8", + "react-query": "3.38.0", + "react-redux": "8.0.1", "react-timeago": "6.2.1", "redux-persist": "6.0.0", "rn-placeholder": "3.0.3", "sentry-expo": "4.1.1", - "tslib": "2.3.1", + "tslib": "2.4.0", "valid-url": "1.0.9" }, "devDependencies": { - "@babel/core": "7.17.8", + "@babel/core": "7.17.9", "@babel/plugin-proposal-optional-chaining": "7.16.7", "@babel/preset-typescript": "7.16.7", - "@expo/config": "6.0.19", - "@types/lodash": "4.14.181", + "@expo/config": "6.0.23", + "@types/lodash": "4.14.182", "@types/react": "17.0.43", "@types/react-dom": "17.0.14", - "@types/react-native": "0.67.3", + "@types/react-native": "0.67.6", "@types/react-native-base64": "^0.2.0", - "@types/react-redux": "7.1.23", "@types/react-timeago": "4.1.3", "@types/valid-url": "1.0.3", "@welldone-software/why-did-you-render": "7.0.1", diff --git a/yarn.lock b/yarn.lock index d397ea8a..b9f6fc60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,7 +28,28 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== -"@babel/core@7.17.8", "@babel/core@^7.0.0", "@babel/core@^7.1.6", "@babel/core@^7.14.0": +"@babel/core@7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" + integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-compilation-targets" "^7.17.7" + "@babel/helper-module-transforms" "^7.17.7" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.9" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/core@^7.0.0", "@babel/core@^7.1.6", "@babel/core@^7.14.0": version "7.17.8" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a" integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ== @@ -58,6 +79,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" + integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== + dependencies: + "@babel/types" "^7.17.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -141,6 +171,14 @@ "@babel/template" "^7.16.7" "@babel/types" "^7.16.7" +"@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/types" "^7.17.0" + "@babel/helper-get-function-arity@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" @@ -265,6 +303,15 @@ "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" + integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.17.9" + "@babel/types" "^7.17.0" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": version "7.16.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" @@ -279,6 +326,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240" integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ== +"@babel/parser@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" + integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" @@ -993,7 +1045,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@7.16.7", "@babel/preset-typescript@^7.1.0": +"@babel/preset-typescript@7.16.7", "@babel/preset-typescript@^7.1.0", "@babel/preset-typescript@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz#ab114d68bb2020afc069cd51b37ff98a046a70b9" integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== @@ -1013,7 +1065,14 @@ pirates "^4.0.5" source-map-support "^0.5.16" -"@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.12.1": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.17.8" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.8.tgz#3e56e4aff81befa55ac3ac6a0967349fd1c5bca2" integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA== @@ -1045,6 +1104,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" + integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.17.9" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.17.9" + "@babel/types" "^7.17.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.4.4": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" @@ -1111,6 +1186,27 @@ xcode "^3.0.1" xml2js "0.4.23" +"@expo/config-plugins@4.1.4": + version "4.1.4" + resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-4.1.4.tgz#08e1a6314dc0f96cd165a748b5997b5ec75a84d0" + integrity sha512-fkOjXnSieQfVSWVLKhst0DnCAyeHksvWky1CldFCQllhDB1HHBiP09Z8pamVB783n3qr/1HNZiSp6k2iUcaSoA== + dependencies: + "@expo/config-types" "^45.0.0" + "@expo/json-file" "8.2.36" + "@expo/plist" "0.0.18" + "@expo/sdk-runtime-versions" "^1.0.0" + "@react-native/normalize-color" "^2.0.0" + chalk "^4.1.2" + debug "^4.3.1" + find-up "~5.0.0" + getenv "^1.0.0" + glob "7.1.6" + resolve-from "^5.0.0" + semver "^7.3.5" + slash "^3.0.0" + xcode "^3.0.1" + xml2js "0.4.23" + "@expo/config-plugins@^2.0.2": version "2.0.4" resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-2.0.4.tgz#955fd70a2aeefbe99ec71cecb1d7ea7b626dc79e" @@ -1144,6 +1240,11 @@ resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-44.0.0.tgz#d3480fe2c99f9e895dae4ebba58b74ed72d03e26" integrity sha512-d+gpdKOAhqaD5RmcMzGgKzNtvE1w+GCqpFQNSXLliYlXjj+Tv0eL8EPeAdPtvke0vowpPFwd5McXLA90dgY6Jg== +"@expo/config-types@^45.0.0": + version "45.0.0" + resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-45.0.0.tgz#963c2fdce8fbcbd003758b92ed8a25375f437ef6" + integrity sha512-/QGhhLWyaGautgEyU50UJr5YqKJix5t77ePTwreOVAhmZH+ff3nrrtYTTnccx+qF08ZNQmfAyYMCD3rQfzpiJA== + "@expo/config@6.0.19", "@expo/config@^6.0.6": version "6.0.19" resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.19.tgz#26a7f7ffb6419cc6e6d4205b3c7764aa9ecb551a" @@ -1161,6 +1262,23 @@ slugify "^1.3.4" sucrase "^3.20.0" +"@expo/config@6.0.23": + version "6.0.23" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.23.tgz#512514b5fd5d5e9d2787bf04a0e795cca470c3c3" + integrity sha512-htanDTaSgtnBrVhAfjVsj8h/t95Kj4clR/nPCm8Puf8H2M7zW6XLV4XV4Pp1fvGZxzBSP+yod+7SBhwa44Q/jQ== + dependencies: + "@babel/code-frame" "~7.10.4" + "@expo/config-plugins" "4.1.4" + "@expo/config-types" "^45.0.0" + "@expo/json-file" "8.2.36" + getenv "^1.0.0" + glob "7.1.6" + require-from-string "^2.0.2" + resolve-from "^5.0.0" + semver "7.3.2" + slugify "^1.3.4" + sucrase "^3.20.0" + "@expo/config@6.0.6": version "6.0.6" resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.6.tgz#64b49b93f07cb046f5a8538a1793bef9070d8d52" @@ -1237,6 +1355,15 @@ json5 "^1.0.1" write-file-atomic "^2.3.0" +"@expo/json-file@8.2.36": + version "8.2.36" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.36.tgz#62a505cb7f30a34d097386476794680a3f7385ff" + integrity sha512-tOZfTiIFA5KmMpdW9KF7bc6CFiGjb0xnbieJhTGlHrLL+ps2G0OkqmuZ3pFEXBOMnJYUVpnSy++52LFxvpa5ZQ== + dependencies: + "@babel/code-frame" "~7.10.4" + json5 "^1.0.1" + write-file-atomic "^2.3.0" + "@expo/metro-config@~0.2.6": version "0.2.8" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.2.8.tgz#c0fd56723e2fb9bb352e788e8f8fe0e218aaf663" @@ -1275,6 +1402,15 @@ base64-js "^1.2.3" xmlbuilder "^14.0.0" +"@expo/plist@0.0.18": + version "0.0.18" + resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.0.18.tgz#9abcde78df703a88f6d9fa1a557ee2f045d178b0" + integrity sha512-+48gRqUiz65R21CZ/IXa7RNBXgAI/uPSdvJqoN9x1hfL44DNbUoWHgHiEXTx7XelcATpDwNTz6sHLfy0iNqf+w== + dependencies: + "@xmldom/xmldom" "~0.7.0" + base64-js "^1.2.3" + xmlbuilder "^14.0.0" + "@expo/prebuild-config@^3.0.15": version "3.1.0" resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-3.1.0.tgz#9fa10f12745ecaa6d3d4957ba97142edb8747a85" @@ -1579,10 +1715,10 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@react-native-community/netinfo@8.2.0": - version "8.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-8.2.0.tgz#0bcf2b618c3b0ab72bb5529df3e580af9e6ae96b" - integrity sha512-mPMg9Uu2XeMX3tainvCWLhD9FZtdox3fcbPXJINuyFNgEQ2AUhGcoUT1dUpcFZrY4eXYiO9cckPhPHq9lWzSAA== +"@react-native-community/netinfo@8.3.0": + version "8.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-8.3.0.tgz#e3d19381c7d9f885b44ea1785ed892bc39c4b0f1" + integrity sha512-VlmjD7Vg1BacbNhwuJCel1eeD8N2Ps6BEcZe9qoSoeIptpCbC86o4ZqD0meSjJzioKSvgalrkmPgMaVYsVipKw== "@react-native-community/segmented-control@2.2.2": version "2.2.2" @@ -1629,10 +1765,10 @@ resolved "https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.3.tgz#9f56b650a9a1a8263a271628be7342c8121d1788" integrity sha512-Lv2lR7si5gNME8dRsqz57d54m4FJtrwHRjNQLOyQO546ZxO+g864cSvoLC6hQedQU0+IJnPTsZiEI2hHqfpEpw== -"@react-navigation/native-stack@6.6.1": - version "6.6.1" - resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.6.1.tgz#b0fc0dfc6fb21704062ec2820a53f982584feef2" - integrity sha512-JQfM3VWTH241ZQhp+UDJ6dZ/WiKJpGxNO4NFNW9AT+D1mxA3GFC3BBiGZfacPrtMOlLmn9FHf0Kh5rD9JYlvhg== +"@react-navigation/native-stack@6.6.2": + version "6.6.2" + resolved "https://registry.yarnpkg.com/@react-navigation/native-stack/-/native-stack-6.6.2.tgz#09e696ad72299872f4c5c1e5b1ad309869853628" + integrity sha512-pFMuzhxbPml5MBvJVAzHWoaUkQaefAOKpuUnAs/AxNQuHQwwnxRmDit1PQLuIPo7g7DlfwFXagDHE1R0tbnS8Q== dependencies: "@react-navigation/elements" "^1.3.3" warn-once "^0.1.0" @@ -1797,10 +1933,10 @@ "@sentry/types" "6.19.2" tslib "^1.9.3" -"@sentry/react-native@3.4.0": - version "3.4.0" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-3.4.0.tgz#6887b1f86c06368da63004de4bd5d7a5e1f2d870" - integrity sha512-2cABpCxu3vE0Khr3qiOUUAosRmYC1Q6K9VQIXs0g0bsiCptPzb0zVhnaYrUVDxPWlMgoGTTDxhvxTyk3IjJITA== +"@sentry/react-native@3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-3.4.1.tgz#640f8c19cbcb6505afbf215576cd5f7a03174d34" + integrity sha512-2eV0XEIpV3uNTLTqDNW7gPkf5SDcUKX9D1R2W00Lh0vLpfvxw8qCVxK+Ls31S2cJ8CFjgcOqRLNfU3CRuLM7eQ== dependencies: "@sentry/browser" "6.19.2" "@sentry/cli" "^1.74.2" @@ -1918,10 +2054,10 @@ xcode "3.0.1" yargs "^16.2.0" -"@sharcoux/slider@5.6.5": - version "5.6.5" - resolved "https://registry.yarnpkg.com/@sharcoux/slider/-/slider-5.6.5.tgz#5d51e0baf0bf58a27eede7e290bd402f1b6cfe42" - integrity sha512-qLDMBbFjhJMcIRbuX2CMPVikeTTvOG/R3R3uBdAOgaCOZQ+GJMn7xrfuL7V87U0zjZuSKIK3ZQFqqgv03kEtGA== +"@sharcoux/slider@6.0.2": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@sharcoux/slider/-/slider-6.0.2.tgz#b67f8f1b17d08860a545084efdf94beb9adfb0bf" + integrity sha512-EYDev2IIUEioR4Yu7wM2lf+DKwu7/U+zr8GeKp7/R59G10C19w9FXfZEz6nDg4TZekIFd3oqbiFEJAGCvi6eiQ== "@sideway/address@^4.1.3": version "4.1.4" @@ -1952,7 +2088,7 @@ resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.41.tgz#f6ecf57d1b12d2befcce00e928a6a097c22980aa" integrity sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA== -"@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1": +"@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== @@ -1984,10 +2120,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/lodash@4.14.181": - version "4.14.181" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.181.tgz#d1d3740c379fda17ab175165ba04e2d03389385d" - integrity sha512-n3tyKthHJbkiWhDZs3DkhkCzt2MexYHXlX0td5iMplyfwketaOeKboEVBqzceH7juqvEg3q5oUoBFxSLu7zFag== +"@types/lodash@4.14.182": + version "4.14.182" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" + integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== "@types/node@*": version "17.0.23" @@ -2011,23 +2147,13 @@ resolved "https://registry.yarnpkg.com/@types/react-native-base64/-/react-native-base64-0.2.0.tgz#c934e7c3cd549d4613bbfa7929a6845ab07a20af" integrity sha512-5kUtS7Kf8Xl4zEwbqLITEuQReQTby4UOGfnsEeBFJEVmUfT+ygOv/Qmv0v6El0iV1eDhXS+/0i7CGR9d3/nRSA== -"@types/react-native@0.67.3": - version "0.67.3" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.3.tgz#baba111c8ce1a45a6034c15f6f0ad98826239780" - integrity sha512-hF4uOZFl2PPQtGWOtLoafrlCJeU815X3PgfVePM+7EhOIZhYXKH7+p3R3cZSnwVnrU5Ep/JfiHimMDliY3o8oQ== +"@types/react-native@0.67.6": + version "0.67.6" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.6.tgz#9a7de5feba6065aec9f44f9a1e8f6e55ee5d015c" + integrity sha512-NM6atxrefIXMLE/PyQ1bIQjQ/lWLdls3uVxItzKvNUUVZlGqgn/uGN4MarM9quSf90uSqJYPIAeAgTtBTUjhgg== dependencies: "@types/react" "*" -"@types/react-redux@7.1.23", "@types/react-redux@^7.1.20": - version "7.1.23" - resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.23.tgz#3c2bb1bcc698ae69d70735f33c5a8e95f41ac528" - integrity sha512-D02o3FPfqQlfu2WeEYwh3x2otYd2Dk1o8wAfsA0B1C2AJEFxE663Ozu7JzuWbznGgW248NaOF6wsqCGNq9d3qw== - dependencies: - "@types/hoist-non-react-statics" "^3.3.0" - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - redux "^4.0.0" - "@types/react-timeago@4.1.3": version "4.1.3" resolved "https://registry.yarnpkg.com/@types/react-timeago/-/react-timeago-4.1.3.tgz#957baaa9f8ea98457ee63b6a57b57a616066ba35" @@ -2049,6 +2175,11 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/use-sync-external-store@^0.0.3": + version "0.0.3" + resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" + integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== + "@types/valid-url@1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@types/valid-url/-/valid-url-1.0.3.tgz#a124389fb953559c7f889795a98620e91adb3687" @@ -2295,6 +2426,11 @@ async@^2.4.0: dependencies: lodash "^4.17.14" +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" @@ -2310,12 +2446,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -axios@0.26.1: - version "0.26.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" - integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== +axios@0.27.2: + version "0.27.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== dependencies: - follow-redirects "^1.14.8" + follow-redirects "^1.14.9" + form-data "^4.0.0" babel-core@^7.0.0-bridge.0: version "7.0.0-bridge.0" @@ -2807,6 +2944,13 @@ colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + command-exists@^1.2.8: version "1.2.9" resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" @@ -3068,6 +3212,11 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -3815,7 +3964,7 @@ flow-parser@^0.121.0: resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.121.0.tgz#9f9898eaec91a9f7c323e9e992d81ab5c58e618f" integrity sha512-1gIBiWJNR0tKUNv8gZuk7l9rVX06OuLzY9AoGio7y/JT4V1IZErEMEq2TJS+PFcw/y0RshZ1J/27VfK1UQzYVg== -follow-redirects@^1.14.8: +follow-redirects@^1.14.9: version "1.14.9" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== @@ -3835,6 +3984,15 @@ foreach@^2.0.5: resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" @@ -4735,7 +4893,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2: +json5@^2.1.2, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== @@ -5364,7 +5522,7 @@ mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.27, mime-types@~2.1.34: +mime-types@^2.1.12, mime-types@^2.1.27, mime-types@~2.1.34: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -6063,10 +6221,10 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.0.tgz#b21c65fe1783743007c8c9a2952b1c8879a77354" integrity sha512-yQaiOqDmoKqks56LN9MTgY06O0qQHgV4FUrikH357DydArSZHQhl0BJFqGKIZoTqi8JizF9Dxhuk1FIZD6qCaw== -react-i18next@11.16.2: - version "11.16.2" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.16.2.tgz#650b18c12a624057ee2651ba4b4a989b526be554" - integrity sha512-1iuZduvARUelL5ux663FvIoDZExwFO+9QtRAAt4uvs1/aun4cUZt8XBrVg7iiDgNls9cOSORAhE7Ri5KA9RMvg== +react-i18next@11.16.7: + version "11.16.7" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.16.7.tgz#8d0680b7f4c8e43f59996336b7183ad576a28df7" + integrity sha512-7yotILJLnKfvUfrl/nt9eK9vFpVFjZPLWAwBzWL6XppSZZEvlmlKk0GBGDCAPfLfs8oND7WAbry8wGzdoiW5Nw== dependencies: "@babel/runtime" "^7.14.5" html-escaper "^2.0.2" @@ -6077,11 +6235,16 @@ react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.1, react-is@^17.0.2: +react-is@^17.0.1: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.1.0.tgz#61aaed3096d30eacf2a2127118b5b41387d32a67" + integrity sha512-Fl7FuabXsJnV5Q1qIOQwx/sagGF18kogb4gpfcG4gjLBWO0WDiiz1ko/ExayuxE7InyQkBLkxRFG5oxY6Uu3Kg== + react-native-animated-spinkit@1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/react-native-animated-spinkit/-/react-native-animated-spinkit-1.5.2.tgz#b1c00ecbadf48634273e6a843f8dfbcb7c006186" @@ -6092,10 +6255,10 @@ react-native-base64@^0.2.1: resolved "https://registry.yarnpkg.com/react-native-base64/-/react-native-base64-0.2.1.tgz#3d0e73a649c4c0129f7b7695d3912456aebae847" integrity sha512-eHgt/MA8y5ZF0aHfZ1aTPcIkDWxza9AaEk4GcpIX+ZYfZ04RcaNahO+527KR7J44/mD3efYfM23O2C1N44ByWA== -react-native-blurhash@1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/react-native-blurhash/-/react-native-blurhash-1.1.9.tgz#5cf9d99602665932c576b13ba6c67a49f20cf7b8" - integrity sha512-36MgpUxHtUsie7/OcsK4v3MOwiSQY/7HVKDR+it8Dn7pYgw4I6rjrkJDPH+cjCpSPC64mfPqgUq92EIQGXPMjw== +react-native-blurhash@1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/react-native-blurhash/-/react-native-blurhash-1.1.10.tgz#3969af24ebab098976cba90d100ba157760d3132" + integrity sha512-ScLdguCk+g9er2ccdwArNet1BOMoU7MClHV2MiNheHwn6HFr9vDkFPnUG011B5ddzCJlqj9JazFBNnxwhSWZhg== react-native-clean-project@4.0.1: version "4.0.1" @@ -6129,10 +6292,10 @@ react-native-flash-message@0.2.1: prop-types "^15.8.1" react-native-iphone-x-helper "^1.3.1" -react-native-gesture-handler@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.3.2.tgz#65ce3b145bd96242c2200abbb9730c94bc73386c" - integrity sha512-ibcYWHMiDbioUcaAMuw3/Taz3mYn0fJz0q2KnGX1hWpLNz/x/E5/BzKB+T3ycwAm1dQEgPgHWpaZ8eqO/EVFlw== +react-native-gesture-handler@2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.4.1.tgz#f4cb1784b6dcdf41ae35b4fff6022ec21038e2cd" + integrity sha512-qJHkZAWyuvZvEm8jV6TsYKeTgkYmoNsKrO/CEx0YaisAcHSiaiMx2Dy/0/QQ7oZr3t5aL4rJqWtOEZCADNbfeQ== dependencies: "@egjs/hammerjs" "^2.0.17" hoist-non-react-statics "^3.3.0" @@ -6158,25 +6321,25 @@ react-native-pager-view@5.4.11: resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-5.4.11.tgz#677540293c7b4e0e022efb45727ef9b4efa35409" integrity sha512-4QlBL5W8yVjeYwrw89oCdABI7sDxIGapFQvIbukfB5mAj1Zn1IQPkBqROLblNFtQ8PbAeexXRgDT1ENWygiJ7A== -react-native-reanimated@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.6.0.tgz#500497339bec2d18fd4979dc07c831997c9aee82" - integrity sha512-TG7u0d1iTx6BRQXhUp9DKEW/9K6169qiX9vweC+qOcVffGSZvjDZ+OyyI0faXIDvcf5LRHAud3mNtO3ANaHRhQ== +react-native-reanimated@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.8.0.tgz#93c06ca84d91fb3865110b0857c49a24e316130e" + integrity sha512-kJvf/UWLBMaGCs9X66MKq5zdFMgwx8D0nHnolbHR7s8ZnbLdb7TlQ/yuzIXqn/9wABfnwtNRI3CyaP1aHWMmZg== dependencies: "@babel/plugin-transform-object-assign" "^7.16.7" + "@babel/preset-typescript" "^7.16.7" "@types/invariant" "^2.2.35" invariant "^2.2.4" lodash.isequal "^4.5.0" - react-native-screens "^3.11.1" setimmediate "^1.0.5" string-hash-64 "^1.0.3" -react-native-safe-area-context@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.2.4.tgz#4df42819759c4d3c74252c8678c2772cfa2271a6" - integrity sha512-OOX+W2G4YYufvryonn6Kw6YnyT8ZThkxPHZBD04NLHaZmicUaaDVII/PZ3M5fD1o5N62+T+8K4bCS5Un2ggvkA== +react-native-safe-area-context@4.2.5: + version "4.2.5" + resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.2.5.tgz#23006dc1a398bb825d7d795c27f1c46119efe8a5" + integrity sha512-nUil2de1gk/8ZB9IzIxFyGCiKeAYcHzJb/Tks2NzSkev1qH4MNR05DWYDSmW6vLT+y4mospLVyG/H5dyUd+KQQ== -react-native-screens@3.13.1, react-native-screens@^3.11.1: +react-native-screens@3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.13.1.tgz#b3b1c5788dca25a71668909f66d87fb35c5c5241" integrity sha512-xcrnuUs0qUrGpc2gOTDY4VgHHADQwp80mwR1prU/Q0JqbZN5W3koLhuOsT6FkSRKjR5t40l+4LcjhHdpqRB2HA== @@ -6238,26 +6401,26 @@ react-native@0.67.4: whatwg-fetch "^3.0.0" ws "^6.1.4" -react-query@3.34.19: - version "3.34.19" - resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.34.19.tgz#0ff049b6e0d2ed148e9abfdd346625d0e88dc229" - integrity sha512-JO0Ymi58WKmvnhgg6bGIrYIeKb64KsKaPWo8JcGnmK2jJxAs2XmMBzlP75ZepSU7CHzcsWtIIyhMrLbX3pb/3w== +react-query@3.38.0: + version "3.38.0" + resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.38.0.tgz#e7f4081e45ba47a4119e548ddcfd0fab18f0580e" + integrity sha512-VRbCTRrDfC5FsB70+JfZuxFRv9SAvkZ1h36MsN8+QaDN+NWB6s1vJndqpoLQnJqN0COTG2zsInMq0KFdYze6TA== dependencies: "@babel/runtime" "^7.5.5" broadcast-channel "^3.4.1" match-sorter "^6.0.2" -react-redux@7.2.8: - version "7.2.8" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" - integrity sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw== +react-redux@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.1.tgz#2bc029f5ada9b443107914c373a2750f6bc0f40c" + integrity sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w== dependencies: - "@babel/runtime" "^7.15.4" - "@types/react-redux" "^7.1.20" + "@babel/runtime" "^7.12.1" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/use-sync-external-store" "^0.0.3" hoist-non-react-statics "^3.3.2" - loose-envify "^1.4.0" - prop-types "^15.7.2" - react-is "^17.0.2" + react-is "^18.0.0" + use-sync-external-store "^1.0.0" react-refresh@^0.4.0: version "0.4.3" @@ -6322,7 +6485,7 @@ redux-thunk@^2.4.1: resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.4.1.tgz#0dd8042cf47868f4b29699941de03c9301a75714" integrity sha512-OOYGNY5Jy2TWvTL1KgAlVy6dcx3siPJ1wTq741EPyUKfn6W6nChdICjZwCd0p8AZBs5kWpZlbkXW2nE/zjUa+Q== -redux@^4.0.0, redux@^4.1.2: +redux@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/redux/-/redux-4.1.2.tgz#140f35426d99bb4729af760afcf79eaaac407104" integrity sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw== @@ -7183,16 +7346,21 @@ ts-interface-checker@^0.1.9: resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== -tslib@2.3.1, tslib@^2.0.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== +tslib@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + type-fest@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" @@ -7344,6 +7512,11 @@ use-subscription@^1.0.0: dependencies: object-assign "^4.1.1" +use-sync-external-store@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.1.0.tgz#3343c3fe7f7e404db70f8c687adf5c1652d34e82" + integrity sha512-SEnieB2FPKEVne66NpXPd1Np4R1lTNKfjuy3XdIoPQKYBAFdzbzSZlSn1KJZUiihQLQC5Znot4SBz1EOTBwQAQ== + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" From bceb70e805bbb4904f5cf457e3fe06c2e02da63c Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Thu, 28 Apr 2022 22:52:47 +0200 Subject: [PATCH 10/36] Bump to v4 Preparing for adding support to v3.5 and above --- package.json | 8 +- src/@types/mastodon.d.ts | 2 - src/store.ts | 2 +- src/utils/migrations/instances/migration.ts | 12 +++ src/utils/migrations/instances/v9.ts | 79 ++++++++++++++++++ src/utils/slices/instances/add.ts | 4 +- src/utils/slices/instancesSlice.ts | 92 +++------------------ yarn.lock | 8 +- 8 files changed, 111 insertions(+), 96 deletions(-) create mode 100644 src/utils/migrations/instances/v9.ts diff --git a/package.json b/package.json index a0ea509c..cc04d4c6 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "tooot", "versions": { - "native": "220328", - "major": 3, - "minor": 6, + "native": "220428", + "major": 4, + "minor": 0, "patch": 0, "expo": "44.0.0" }, @@ -62,7 +62,7 @@ "expo-updates": "0.11.6", "expo-video-thumbnails": "6.2.0", "expo-web-browser": "10.1.1", - "i18next": "21.6.14", + "i18next": "21.6.16", "li": "1.3.0", "lodash": "4.17.21", "react": "17.0.2", diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index de1742b7..6e7d2805 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -320,8 +320,6 @@ declare namespace Mastodon { max_expiration: number } } - // Custom - to be deprecated in v4 - max_toot_chars?: number } type Mention = { diff --git a/src/store.ts b/src/store.ts index 4df61af2..5e4e8afc 100644 --- a/src/store.ts +++ b/src/store.ts @@ -27,7 +27,7 @@ const instancesPersistConfig = { key: 'instances', prefix, storage: secureStorage, - version: 8, + version: 9, // @ts-ignore migrate: createMigrate(instancesMigration) } diff --git a/src/utils/migrations/instances/migration.ts b/src/utils/migrations/instances/migration.ts index f45abb0a..f7079c88 100644 --- a/src/utils/migrations/instances/migration.ts +++ b/src/utils/migrations/instances/migration.ts @@ -4,6 +4,7 @@ import { InstanceV5 } from './v5' import { InstanceV6 } from './v6' import { InstanceV7 } from './v7' import { InstanceV8 } from './v8' +import { InstanceV9 } from './v9' const instancesMigration = { 4: (state: InstanceV3): InstanceV4 => { @@ -87,6 +88,17 @@ const instancesMigration = { } }) } + }, + 9: (state: InstanceV8): { instances: InstanceV9[] } => { + return { + // @ts-ignore + instances: state.instances.map(instance => { + return { + ...instance, + version: '0' + } + }) + } } } diff --git a/src/utils/migrations/instances/v9.ts b/src/utils/migrations/instances/v9.ts new file mode 100644 index 00000000..2e2d47b5 --- /dev/null +++ b/src/utils/migrations/instances/v9.ts @@ -0,0 +1,79 @@ +import { ComposeStateDraft } from '@screens/Compose/utils/types' +import { QueryKeyTimeline } from '@utils/queryHooks/timeline' + +export type InstanceV9 = { + active: boolean + appData: { + clientId: string + clientSecret: string + } + url: string + token: string + uri: Mastodon.Instance['uri'] + urls: Mastodon.Instance['urls'] + account: { + id: Mastodon.Account['id'] + acct: Mastodon.Account['acct'] + avatarStatic: Mastodon.Account['avatar_static'] + preferences: Mastodon.Preferences + } + version: string + configuration?: Mastodon.Instance['configuration'] + filters: Mastodon.Filter[] + notifications_filter: { + follow: boolean + favourite: boolean + reblog: boolean + mention: boolean + poll: boolean + follow_request: boolean + } + push: { + global: { loading: boolean; value: boolean } + decode: { loading: boolean; value: boolean } + alerts: { + follow: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['follow'] + } + favourite: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['favourite'] + } + reblog: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['reblog'] + } + mention: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['mention'] + } + poll: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['poll'] + } + } + keys: { + auth?: string + public?: string // legacy + private?: string // legacy + } + } + timelinesLookback?: { + [key: string]: { + queryKey: QueryKeyTimeline + ids: Mastodon.Status['id'][] + } + } + mePage: { + lists: { shown: boolean } + announcements: { shown: boolean; unread: number } + } + drafts: ComposeStateDraft[] + frequentEmojis: { + emoji: Pick + score: number + count: number + lastUsed: number + }[] +} diff --git a/src/utils/slices/instances/add.ts b/src/utils/slices/instances/add.ts index 470cfc13..5b5b95e0 100644 --- a/src/utils/slices/instances/add.ts +++ b/src/utils/slices/instances/add.ts @@ -74,9 +74,7 @@ const addInstance = createAsyncThunk( avatarStatic: avatar_static, preferences }, - ...(instance.max_toot_chars && { - max_toot_chars: instance.max_toot_chars - }), + version: instance.version, ...(instance.configuration && { configuration: instance.configuration }), diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index b6b553cb..1b5eb961 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -2,7 +2,7 @@ import analytics from '@components/analytics' import { createSlice, PayloadAction } from '@reduxjs/toolkit' import { RootState } from '@root/store' import { ComposeStateDraft } from '@screens/Compose/utils/types' -import { QueryKeyTimeline } from '@utils/queryHooks/timeline' +import { InstanceV9 } from '@utils/migrations/instances/v9' import addInstance from './instances/add' import { checkEmojis } from './instances/checkEmojis' import removeInstance from './instances/remove' @@ -13,82 +13,7 @@ import { updateInstancePush } from './instances/updatePush' import { updateInstancePushAlert } from './instances/updatePushAlert' import { updateInstancePushDecode } from './instances/updatePushDecode' -export type Instance = { - active: boolean - appData: { - clientId: string - clientSecret: string - } - url: string - token: string - uri: Mastodon.Instance['uri'] - urls: Mastodon.Instance['urls'] - account: { - id: Mastodon.Account['id'] - acct: Mastodon.Account['acct'] - avatarStatic: Mastodon.Account['avatar_static'] - preferences: Mastodon.Preferences - } - max_toot_chars?: number // To be deprecated in v4 - configuration?: Mastodon.Instance['configuration'] - filters: Mastodon.Filter[] - notifications_filter: { - follow: boolean - favourite: boolean - reblog: boolean - mention: boolean - poll: boolean - follow_request: boolean - } - push: { - global: { loading: boolean; value: boolean } - decode: { loading: boolean; value: boolean } - alerts: { - follow: { - loading: boolean - value: Mastodon.PushSubscription['alerts']['follow'] - } - favourite: { - loading: boolean - value: Mastodon.PushSubscription['alerts']['favourite'] - } - reblog: { - loading: boolean - value: Mastodon.PushSubscription['alerts']['reblog'] - } - mention: { - loading: boolean - value: Mastodon.PushSubscription['alerts']['mention'] - } - poll: { - loading: boolean - value: Mastodon.PushSubscription['alerts']['poll'] - } - } - keys: { - auth?: string - public?: string // legacy - private?: string // legacy - } - } - timelinesLookback?: { - [key: string]: { - queryKey: QueryKeyTimeline - ids: Mastodon.Status['id'][] - } - } - mePage: { - lists: { shown: boolean } - announcements: { shown: boolean; unread: number } - } - drafts: ComposeStateDraft[] - frequentEmojis: { - emoji: Pick - score: number - count: number - lastUsed: number - }[] -} +export type Instance = InstanceV9 export type InstancesState = { instances: Instance[] @@ -318,8 +243,7 @@ const instancesSlice = createSlice({ // Update Instance Configuration .addCase(updateConfiguration.fulfilled, (state, action) => { const activeIndex = findInstanceActive(state.instances) - state.instances[activeIndex].max_toot_chars = - action.payload.max_toot_chars + state.instances[activeIndex].version = action.payload.version state.instances[activeIndex].configuration = action.payload.configuration }) @@ -415,14 +339,18 @@ export const getInstanceUri = ({ instances: { instances } }: RootState) => export const getInstanceUrls = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.urls +export const getInstanceVersion = ({ instances: { instances } }: RootState) => + instances[findInstanceActive(instances)]?.version +export const getInstanceVersionInFloat = ({ + instances: { instances } +}: RootState) => parseFloat(instances[findInstanceActive(instances)]?.version) + /* Get Instance Configuration */ export const getInstanceConfigurationStatusMaxChars = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.configuration?.statuses - .max_characters || - instances[findInstanceActive(instances)]?.max_toot_chars || - 500 + .max_characters || 500 export const getInstanceConfigurationStatusMaxAttachments = ({ instances: { instances } diff --git a/yarn.lock b/yarn.lock index b9f6fc60..7ee519e3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,10 +4304,10 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -i18next@21.6.14: - version "21.6.14" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.6.14.tgz#2bc199fba7f4da44b5952d7df0a3814a6e5c3943" - integrity sha512-XL6WyD+xlwQwbieXRlXhKWoLb/rkch50/rA+vl6untHnJ+aYnkQ0YDZciTWE78PPhOpbi2gR0LTJCJpiAhA+uQ== +i18next@21.6.16: + version "21.6.16" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.6.16.tgz#8cff8c3ba2ffaf8438a8c83fe284083f15cf3941" + integrity sha512-xJlzrVxG9CyAGsbMP1aKuiNr1Ed2m36KiTB7hjGMG2Zo4idfw3p9THUEu+GjBwIgEZ7F11ZbCzJcfv4uyfKNuw== dependencies: "@babel/runtime" "^7.17.2" From 95ec76f411ed984eaeac60fa8cb8439d35dad477 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Fri, 29 Apr 2022 23:57:18 +0200 Subject: [PATCH 11/36] Edited posts can be viewed --- src/@types/mastodon.d.ts | 12 ++ src/@types/untyped.d.ts | 5 + src/components/Hashtag.tsx | 3 +- src/components/Parse/HTML.tsx | 5 +- src/components/Timeline/Conversation.tsx | 3 +- src/components/Timeline/Default.tsx | 7 +- src/components/Timeline/Notifications.tsx | 3 +- src/components/Timeline/Shared/Actioned.tsx | 3 +- .../Timeline/Shared/ActionsUsers.tsx | 108 -------------- src/components/Timeline/Shared/Attachment.tsx | 3 +- src/components/Timeline/Shared/Avatar.tsx | 3 +- src/components/Timeline/Shared/Content.tsx | 5 +- src/components/Timeline/Shared/Feedback.tsx | 141 ++++++++++++++++++ .../Timeline/Shared/HeaderConversation.tsx | 1 + .../Timeline/Shared/HeaderDefault.tsx | 10 +- .../Timeline/Shared/HeaderNotification.tsx | 12 +- .../Timeline/Shared/HeaderShared/Created.tsx | 37 +++-- src/helpers/features.json | 7 + src/i18n/en/components/timeline.json | 9 ++ src/i18n/en/screens/tabs.json | 3 + src/screens/Tabs/Shared/History.tsx | 105 +++++++++++++ src/screens/Tabs/Shared/Root.tsx | 8 + src/utils/navigation/navigators.ts | 23 ++- src/utils/queryHooks/statusesHistory.ts | 34 +++++ src/utils/slices/instancesSlice.ts | 15 +- 25 files changed, 411 insertions(+), 154 deletions(-) delete mode 100644 src/components/Timeline/Shared/ActionsUsers.tsx create mode 100644 src/components/Timeline/Shared/Feedback.tsx create mode 100644 src/helpers/features.json create mode 100644 src/screens/Tabs/Shared/History.tsx create mode 100644 src/utils/queryHooks/statusesHistory.ts diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index 6e7d2805..2e1663f7 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -426,6 +426,7 @@ declare namespace Mastodon { reblogs_count: number favourites_count: number replies_count: number + edited_at?: string // FEATURE edit_post favourited: boolean reblogged: boolean muted: boolean @@ -443,6 +444,17 @@ declare namespace Mastodon { text?: string } + type StatusHistory = { + content: Status['content'] + spoiler_text: Status['spoiler_text'] + sensitive: Status['sensitive'] + created_at: Status['created_at'] + poll: Status['poll'] + account: Status['account'] + media_attachments: Status['media_attachments'] + emojis: Status['emojis'] + } + type Source = { // Base note: string diff --git a/src/@types/untyped.d.ts b/src/@types/untyped.d.ts index 9220fed3..e3b7bc1a 100644 --- a/src/@types/untyped.d.ts +++ b/src/@types/untyped.d.ts @@ -4,3 +4,8 @@ declare module 'li' declare module 'react-native-feather' declare module 'react-native-htmlview' declare module 'react-native-toast-message' + +declare module '@helpers/features' { + const features: { feature: string; version: number; reference?: string }[] + export default features +} diff --git a/src/components/Hashtag.tsx b/src/components/Hashtag.tsx index c32a9ef7..fede3ab9 100644 --- a/src/components/Hashtag.tsx +++ b/src/components/Hashtag.tsx @@ -1,5 +1,6 @@ import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useCallback } from 'react' @@ -19,7 +20,7 @@ const ComponentHashtag: React.FC = ({ }) => { const { colors } = useTheme() const navigation = - useNavigation>() + useNavigation>() const onPress = useCallback(() => { analytics('search_account_press', { page: origin }) diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index 38d88536..518305dd 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -4,6 +4,7 @@ import openLink from '@components/openLink' import ParseEmojis from '@components/Parse/Emojis' import { useNavigation, useRoute } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { getSettingsFontsize } from '@utils/slices/settingsSlice' import { StyleConstants } from '@utils/styles/constants' import layoutAnimation from '@utils/styles/layoutAnimation' @@ -35,7 +36,7 @@ const renderNode = ({ index: number adaptedFontsize: number adaptedLineheight: number - navigation: StackNavigationProp + navigation: StackNavigationProp mentions?: Mastodon.Mention[] tags?: Mastodon.Tag[] showFullLink: boolean @@ -194,7 +195,7 @@ const ParseHTML = React.memo( ) const navigation = - useNavigation>() + useNavigation>() const route = useRoute() const { colors, theme } = useTheme() const { t, i18n } = useTranslation('componentParse') diff --git a/src/components/Timeline/Conversation.tsx b/src/components/Timeline/Conversation.tsx index 601ba7f9..53378308 100644 --- a/src/components/Timeline/Conversation.tsx +++ b/src/components/Timeline/Conversation.tsx @@ -3,6 +3,7 @@ import analytics from '@components/analytics' import GracefullyImage from '@components/GracefullyImage' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { getInstanceAccount } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' @@ -78,7 +79,7 @@ const TimelineConversation: React.FC = ({ }) const navigation = - useNavigation>() + useNavigation>() const onPress = useCallback(() => { analytics('timeline_conversation_press') if (conversation.last_status) { diff --git a/src/components/Timeline/Default.tsx b/src/components/Timeline/Default.tsx index 4d02049f..03f325fc 100644 --- a/src/components/Timeline/Default.tsx +++ b/src/components/Timeline/Default.tsx @@ -9,6 +9,7 @@ import TimelineHeaderDefault from '@components/Timeline/Shared/HeaderDefault' import TimelinePoll from '@components/Timeline/Shared/Poll' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { getInstanceAccount } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' @@ -17,7 +18,7 @@ import { uniqBy } from 'lodash' import React, { useCallback } from 'react' import { Pressable, StyleSheet, View } from 'react-native' import { useSelector } from 'react-redux' -import TimelineActionsUsers from './Shared/ActionsUsers' +import TimelineFeedback from './Shared/Feedback' import TimelineFiltered, { shouldFilter } from './Shared/Filtered' import TimelineFullConversation from './Shared/FullConversation' import TimelineTranslate from './Shared/Translate' @@ -45,7 +46,7 @@ const TimelineDefault: React.FC = ({ const { colors } = useTheme() const instanceAccount = useSelector(getInstanceAccount, () => true) const navigation = - useNavigation>() + useNavigation>() const actualStatus = item.reblog ? item.reblog : item @@ -143,7 +144,7 @@ const TimelineDefault: React.FC = ({ ) : null} - + {queryKey && !disableDetails ? ( diff --git a/src/components/Timeline/Notifications.tsx b/src/components/Timeline/Notifications.tsx index 14c33f58..5d5693dc 100644 --- a/src/components/Timeline/Notifications.tsx +++ b/src/components/Timeline/Notifications.tsx @@ -9,6 +9,7 @@ import TimelineHeaderNotification from '@components/Timeline/Shared/HeaderNotifi import TimelinePoll from '@components/Timeline/Shared/Poll' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { getInstanceAccount } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' @@ -44,7 +45,7 @@ const TimelineNotifications: React.FC = ({ (prev, next) => prev?.id === next?.id ) const navigation = - useNavigation>() + useNavigation>() const actualAccount = notification.status ? notification.status.account diff --git a/src/components/Timeline/Shared/Actioned.tsx b/src/components/Timeline/Shared/Actioned.tsx index c0ce1d26..122b1fae 100644 --- a/src/components/Timeline/Shared/Actioned.tsx +++ b/src/components/Timeline/Shared/Actioned.tsx @@ -3,6 +3,7 @@ import Icon from '@components/Icon' import { ParseEmojis } from '@components/Parse' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useCallback, useMemo } from 'react' @@ -20,7 +21,7 @@ const TimelineActioned = React.memo( const { t } = useTranslation('componentTimeline') const { colors } = useTheme() const navigation = - useNavigation>() + useNavigation>() const name = account.display_name || account.username const iconColor = colors.primaryDefault diff --git a/src/components/Timeline/Shared/ActionsUsers.tsx b/src/components/Timeline/Shared/ActionsUsers.tsx deleted file mode 100644 index 08ccbf00..00000000 --- a/src/components/Timeline/Shared/ActionsUsers.tsx +++ /dev/null @@ -1,108 +0,0 @@ -import analytics from '@components/analytics' -import { useNavigation } from '@react-navigation/native' -import { StackNavigationProp } from '@react-navigation/stack' -import { StyleConstants } from '@utils/styles/constants' -import { useTheme } from '@utils/styles/ThemeManager' -import React from 'react' -import { useTranslation } from 'react-i18next' -import { StyleSheet, Text, View } from 'react-native' - -export interface Props { - status: Mastodon.Status - highlighted: boolean -} - -const TimelineActionsUsers = React.memo( - ({ status, highlighted }: Props) => { - if (!highlighted) { - return null - } - - const { t } = useTranslation('componentTimeline') - const { colors } = useTheme() - const navigation = - useNavigation>() - - return ( - - {status.reblogs_count > 0 ? ( - { - analytics('timeline_shared_actionsusers_press_boosted', { - count: status.reblogs_count - }) - navigation.push('Tab-Shared-Users', { - reference: 'statuses', - id: status.id, - type: 'reblogged_by', - count: status.reblogs_count - }) - }} - > - {t('shared.actionsUsers.reblogged_by.text', { - count: status.reblogs_count - })} - - ) : null} - {status.favourites_count > 0 ? ( - { - analytics('timeline_shared_actionsusers_press_boosted', { - count: status.favourites_count - }) - navigation.push('Tab-Shared-Users', { - reference: 'statuses', - id: status.id, - type: 'favourited_by', - count: status.favourites_count - }) - }} - > - {t('shared.actionsUsers.favourited_by.text', { - count: status.favourites_count - })} - - ) : null} - - ) - }, - (prev, next) => - prev.status.reblogs_count === next.status.reblogs_count && - prev.status.favourites_count === next.status.favourites_count -) - -const styles = StyleSheet.create({ - base: { - flexDirection: 'row' - }, - text: { - ...StyleConstants.FontStyle.M, - padding: StyleConstants.Spacing.S, - paddingLeft: 0, - marginRight: StyleConstants.Spacing.S - } -}) - -export default TimelineActionsUsers diff --git a/src/components/Timeline/Shared/Attachment.tsx b/src/components/Timeline/Shared/Attachment.tsx index a0444e69..d1a9e322 100644 --- a/src/components/Timeline/Shared/Attachment.tsx +++ b/src/components/Timeline/Shared/Attachment.tsx @@ -6,6 +6,7 @@ import AttachmentImage from '@components/Timeline/Shared/Attachment/Image' import AttachmentUnsupported from '@components/Timeline/Shared/Attachment/Unsupported' import AttachmentVideo from '@components/Timeline/Shared/Attachment/Video' import { useNavigation } from '@react-navigation/native' +import { StackNavigationProp } from '@react-navigation/stack' import { RootStackParamList } from '@utils/navigation/navigators' import { StyleConstants } from '@utils/styles/constants' import layoutAnimation from '@utils/styles/layoutAnimation' @@ -38,7 +39,7 @@ const TimelineAttachment = React.memo( const imageUrls = useRef< RootStackParamList['Screen-ImagesViewer']['imageUrls'] >([]) - const navigation = useNavigation() + const navigation = useNavigation>() useEffect(() => { status.media_attachments.forEach((attachment, index) => { switch (attachment.type) { diff --git a/src/components/Timeline/Shared/Avatar.tsx b/src/components/Timeline/Shared/Avatar.tsx index 228a77a6..c4bd9701 100644 --- a/src/components/Timeline/Shared/Avatar.tsx +++ b/src/components/Timeline/Shared/Avatar.tsx @@ -2,6 +2,7 @@ import analytics from '@components/analytics' import GracefullyImage from '@components/GracefullyImage' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { StyleConstants } from '@utils/styles/constants' import React, { useCallback } from 'react' @@ -17,7 +18,7 @@ const TimelineAvatar = React.memo( ({ queryKey, account, highlighted }: Props) => { const { t } = useTranslation('componentTimeline') const navigation = - useNavigation>() + useNavigation>() // Need to fix go back root const onPress = useCallback(() => { analytics('timeline_shared_avatar_press', { diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index f99f4a04..576f3247 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -5,7 +5,10 @@ import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' export interface Props { - status: Mastodon.Status + status: Pick & { + mentions?: Mastodon.Status['mentions'] + tags?: Mastodon.Status['tags'] + } numberOfLines?: number highlighted?: boolean disableDetails?: boolean diff --git a/src/components/Timeline/Shared/Feedback.tsx b/src/components/Timeline/Shared/Feedback.tsx new file mode 100644 index 00000000..6aae7492 --- /dev/null +++ b/src/components/Timeline/Shared/Feedback.tsx @@ -0,0 +1,141 @@ +import analytics from '@components/analytics' +import { useNavigation } from '@react-navigation/native' +import { StackNavigationProp } from '@react-navigation/stack' +import { TabLocalStackParamList } from '@utils/navigation/navigators' +import { useStatusHistory } from '@utils/queryHooks/statusesHistory' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import React from 'react' +import { useTranslation } from 'react-i18next' +import { StyleSheet, Text, View } from 'react-native' + +export interface Props { + status: Mastodon.Status + highlighted: boolean +} + +const TimelineFeedback = React.memo( + ({ status, highlighted }: Props) => { + if (!highlighted) { + return null + } + + const { t } = useTranslation('componentTimeline') + const { colors } = useTheme() + const navigation = + useNavigation>() + + const { data } = useStatusHistory({ + id: status.id, + options: { enabled: status.edited_at !== undefined } + }) + + return ( + + + {status.reblogs_count > 0 ? ( + { + analytics('timeline_shared_feedback_press_reblog', { + count: status.reblogs_count + }) + navigation.push('Tab-Shared-Users', { + reference: 'statuses', + id: status.id, + type: 'reblogged_by', + count: status.reblogs_count + }) + }} + > + {t('shared.actionsUsers.reblogged_by.text', { + count: status.reblogs_count + })} + + ) : null} + {status.favourites_count > 0 ? ( + { + analytics('timeline_shared_feedback_press_favourite', { + count: status.favourites_count + }) + navigation.push('Tab-Shared-Users', { + reference: 'statuses', + id: status.id, + type: 'favourited_by', + count: status.favourites_count + }) + }} + > + {t('shared.actionsUsers.favourited_by.text', { + count: status.favourites_count + })} + + ) : null} + + + {data && data.length > 1 ? ( + { + analytics('timeline_shared_feedback_press_history', { + count: data.length - 1 + }) + navigation.push('Tab-Shared-History', { id: status.id }) + }} + > + {t('shared.actionsUsers.history.text', { + count: data.length - 1 + })} + + ) : null} + + + ) + }, + (prev, next) => + prev.status.reblogs_count === next.status.reblogs_count && + prev.status.favourites_count === next.status.favourites_count +) + +const styles = StyleSheet.create({ + text: { + ...StyleConstants.FontStyle.M, + padding: StyleConstants.Spacing.S, + paddingLeft: 0, + marginRight: StyleConstants.Spacing.S + } +}) + +export default TimelineFeedback diff --git a/src/components/Timeline/Shared/HeaderConversation.tsx b/src/components/Timeline/Shared/HeaderConversation.tsx index fd0b2083..142b40f2 100644 --- a/src/components/Timeline/Shared/HeaderConversation.tsx +++ b/src/components/Timeline/Shared/HeaderConversation.tsx @@ -103,6 +103,7 @@ const HeaderConversation = React.memo( {conversation.last_status?.created_at ? ( ) : null} diff --git a/src/components/Timeline/Shared/HeaderDefault.tsx b/src/components/Timeline/Shared/HeaderDefault.tsx index f25a09d0..09b5f625 100644 --- a/src/components/Timeline/Shared/HeaderDefault.tsx +++ b/src/components/Timeline/Shared/HeaderDefault.tsx @@ -1,5 +1,7 @@ import Icon from '@components/Icon' import { useNavigation } from '@react-navigation/native' +import { StackNavigationProp } from '@react-navigation/stack' +import { RootStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' @@ -21,7 +23,7 @@ export interface Props { const TimelineHeaderDefault = React.memo( ({ queryKey, rootQueryKey, status }: Props) => { const { t } = useTranslation('componentTimeline') - const navigation = useNavigation() + const navigation = useNavigation>() const { colors } = useTheme() return ( @@ -29,7 +31,10 @@ const TimelineHeaderDefault = React.memo( - + @@ -45,7 +50,6 @@ const TimelineHeaderDefault = React.memo( queryKey, rootQueryKey, status, - url: status.url || status.uri, type: 'status' }) } diff --git a/src/components/Timeline/Shared/HeaderNotification.tsx b/src/components/Timeline/Shared/HeaderNotification.tsx index e12e8fe7..d50ec4de 100644 --- a/src/components/Timeline/Shared/HeaderNotification.tsx +++ b/src/components/Timeline/Shared/HeaderNotification.tsx @@ -4,6 +4,8 @@ import { RelationshipOutgoing } from '@components/Relationship' import { useNavigation } from '@react-navigation/native' +import { StackNavigationProp } from '@react-navigation/stack' +import { RootStackParamList } from '@utils/navigation/navigators' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' @@ -22,7 +24,7 @@ export interface Props { const TimelineHeaderNotification = React.memo( ({ queryKey, notification }: Props) => { - const navigation = useNavigation() + const navigation = useNavigation>() const { colors } = useTheme() const actions = useMemo(() => { @@ -44,8 +46,7 @@ const TimelineHeaderNotification = React.memo( onPress={() => navigation.navigate('Screen-Actions', { queryKey, - status: notification.status, - url: notification.status?.url || notification.status?.uri, + status: notification.status!, type: 'status' }) } @@ -83,7 +84,10 @@ const TimelineHeaderNotification = React.memo( notification.type === 'follow_request') && { withoutName: true })} /> - + {notification.status?.visibility ? ( { + ({ created_at, edited_at }: Props) => { + const { t } = useTranslation('componentTimeline') const { colors } = useTheme() return ( - - - + <> + + + + {edited_at ? ( + + ) : null} + ) }, () => true ) -const styles = StyleSheet.create({ - created_at: { - ...StyleConstants.FontStyle.S - } -}) - export default HeaderSharedCreated diff --git a/src/helpers/features.json b/src/helpers/features.json new file mode 100644 index 00000000..1fc2de40 --- /dev/null +++ b/src/helpers/features.json @@ -0,0 +1,7 @@ +[ + { + "feature": "edit_post", + "version": 3.5, + "reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0" + } +] \ No newline at end of file diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index 6df22065..cf4b5596 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -58,6 +58,12 @@ "accessibilityLabel": "{{count}} users have favourited this toot", "accessibilityHint": "Tap to know the users", "text": "$t(screenTabs:shared.users.statuses.favourited_by)" + }, + "history": { + "accessibilityLabel": "This toot has been edited {{count}} times", + "accessibilityHint": "Tap to know view the full history", + "text": "{{count}} edit", + "text_plural": "{{count}} edits" } }, "attachment": { @@ -96,6 +102,9 @@ } }, "application": "Tooted with {{application}}", + "edited": { + "accessibilityLabel": "Toot edited" + }, "muted": { "accessibilityLabel": "Toot muted" }, diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index 399daedc..9dc92f8b 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -331,6 +331,9 @@ "reblogged_by": "{{count}} boosted", "favourited_by": "{{count}} favourited" } + }, + "history": { + "name": "Edit History" } } } \ No newline at end of file diff --git a/src/screens/Tabs/Shared/History.tsx b/src/screens/Tabs/Shared/History.tsx new file mode 100644 index 00000000..c98bb6c8 --- /dev/null +++ b/src/screens/Tabs/Shared/History.tsx @@ -0,0 +1,105 @@ +import Icon from '@components/Icon' +import { ParseEmojis } from '@components/Parse' +import ComponentSeparator from '@components/Separator' +import TimelineAttachment from '@components/Timeline/Shared/Attachment' +import TimelineContent from '@components/Timeline/Shared/Content' +import HeaderSharedCreated from '@components/Timeline/Shared/HeaderShared/Created' +import { TabSharedStackScreenProps } from '@utils/navigation/navigators' +import { useStatusHistory } from '@utils/queryHooks/statusesHistory' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import React from 'react' +import { Text, View } from 'react-native' +import { ScrollView } from 'react-native-gesture-handler' + +const ContentView = ({ + history, + first, + last +}: { + history: Mastodon.StatusHistory + first: boolean + last: boolean +}) => { + const { colors } = useTheme() + return ( + <> + + + {typeof history.content === 'string' && history.content.length > 0 ? ( + + ) : null} + {history.poll + ? history.poll.options.map((option, index) => ( + + + + + + + + + )) + : null} + {Array.isArray(history.media_attachments) && + history.media_attachments.length ? ( + + ) : null} + + {!last ? : null} + + ) +} + +const TabSharedHistory: React.FC< + TabSharedStackScreenProps<'Tab-Shared-History'> +> = ({ + route: { + params: { id } + } +}) => { + const { data } = useStatusHistory({ id }) + + return ( + + {data && data.length > 0 + ? data + .slice(0) + .reverse() + .map((d, i) => + i !== 0 ? ( + + ) : null + ) + : null} + + ) +} + +export default TabSharedHistory diff --git a/src/screens/Tabs/Shared/Root.tsx b/src/screens/Tabs/Shared/Root.tsx index 87558b83..74b42939 100644 --- a/src/screens/Tabs/Shared/Root.tsx +++ b/src/screens/Tabs/Shared/Root.tsx @@ -4,6 +4,7 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack' import TabSharedAccount from '@screens/Tabs/Shared/Account' import TabSharedAttachments from '@screens/Tabs/Shared/Attachments' import TabSharedHashtag from '@screens/Tabs/Shared/Hashtag' +import TabSharedHistory from '@screens/Tabs/Shared/History' import TabSharedSearch from '@screens/Tabs/Shared/Search' import TabSharedToot from '@screens/Tabs/Shared/Toot' import TabSharedUsers from '@screens/Tabs/Shared/Users' @@ -95,6 +96,13 @@ const TabSharedRoot = ({ })} /> + + = NativeStackScreenProps +export type RootStackScreenProps = + NativeStackScreenProps export type ScreenComposeStackParamList = { 'Screen-Compose-Root': undefined @@ -90,9 +89,8 @@ export type ScreenTabsStackParamList = { 'Tab-Notifications': NavigatorScreenParams 'Tab-Me': NavigatorScreenParams } -export type ScreenTabsScreenProps< - T extends keyof ScreenTabsStackParamList -> = BottomTabScreenProps +export type ScreenTabsScreenProps = + BottomTabScreenProps export type TabSharedStackParamList = { 'Tab-Shared-Account': { @@ -102,6 +100,9 @@ export type TabSharedStackParamList = { 'Tab-Shared-Hashtag': { hashtag: Mastodon.Tag['name'] } + 'Tab-Shared-History': { + id: Mastodon.Status['id'] + } 'Tab-Shared-Search': { text: string | undefined } 'Tab-Shared-Toot': { toot: Mastodon.Status @@ -121,9 +122,8 @@ export type TabSharedStackParamList = { count: number } } -export type TabSharedStackScreenProps< - T extends keyof TabSharedStackParamList -> = NativeStackScreenProps +export type TabSharedStackScreenProps = + NativeStackScreenProps export type TabLocalStackParamList = { 'Tab-Local-Root': undefined @@ -153,9 +153,8 @@ export type TabMeStackParamList = { 'Tab-Me-Settings-Fontsize': undefined 'Tab-Me-Switch': undefined } & TabSharedStackParamList -export type TabMeStackScreenProps< - T extends keyof TabMeStackParamList -> = NativeStackScreenProps +export type TabMeStackScreenProps = + NativeStackScreenProps export type TabMeStackNavigationProp< RouteName extends keyof TabMeStackParamList > = StackNavigationProp diff --git a/src/utils/queryHooks/statusesHistory.ts b/src/utils/queryHooks/statusesHistory.ts new file mode 100644 index 00000000..a1a3e76b --- /dev/null +++ b/src/utils/queryHooks/statusesHistory.ts @@ -0,0 +1,34 @@ +import apiInstance from '@api/instance' +import { AxiosError } from 'axios' +import { QueryFunctionContext, useQuery, UseQueryOptions } from 'react-query' + +export type QueryKeyStatusesHistory = [ + 'StatusesHistory', + { id: Mastodon.Status['id'] } +] + +const queryFunction = async ({ + queryKey +}: QueryFunctionContext) => { + const { id } = queryKey[1] + const res = await apiInstance({ + method: 'get', + url: `statuses/${id}/history` + }) + return res.body +} + +const useStatusHistory = ({ + options, + ...queryKeyParams +}: QueryKeyStatusesHistory[1] & { + options?: UseQueryOptions +}) => { + const queryKey: QueryKeyStatusesHistory = [ + 'StatusesHistory', + { ...queryKeyParams } + ] + return useQuery(queryKey, queryFunction, options) +} + +export { useStatusHistory } diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index 1b5eb961..5d62ee10 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -1,4 +1,5 @@ import analytics from '@components/analytics' +import features from '@helpers/features' import { createSlice, PayloadAction } from '@reduxjs/toolkit' import { RootState } from '@root/store' import { ComposeStateDraft } from '@screens/Compose/utils/types' @@ -341,9 +342,17 @@ export const getInstanceUrls = ({ instances: { instances } }: RootState) => export const getInstanceVersion = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.version -export const getInstanceVersionInFloat = ({ - instances: { instances } -}: RootState) => parseFloat(instances[findInstanceActive(instances)]?.version) +export const checkInstanceFeature = + (feature: string) => + ({ instances: { instances } }: RootState) => { + return features + .filter(f => f.feature === feature) + .filter( + f => + parseFloat(instances[findInstanceActive(instances)]?.version) >= + f.version + ) + } /* Get Instance Configuration */ export const getInstanceConfigurationStatusMaxChars = ({ From d4f91a5756278e79149d2615f193cef0494af1ce Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 30 Apr 2022 17:44:39 +0200 Subject: [PATCH 12/36] Basic editing works --- src/components/Parse/HTML.tsx | 2 +- src/components/Timeline/Shared/Content.tsx | 2 +- src/i18n/en/components/timeline.json | 16 ++- src/i18n/en/screens/compose.json | 1 + src/i18n/ko/components/timeline.json | 2 +- src/i18n/vi/components/timeline.json | 2 +- src/i18n/zh-Hans/components/timeline.json | 2 +- src/screens/Actions/Status.tsx | 102 +++++++++++++++--- src/screens/Compose.tsx | 20 +++- src/screens/Compose/utils/parseState.ts | 1 + src/screens/Compose/utils/post.ts | 11 +- src/utils/navigation/navigators.ts | 29 ++--- src/utils/queryHooks/timeline.ts | 17 ++- src/utils/queryHooks/timeline/deleteItem.ts | 6 +- src/utils/queryHooks/timeline/editItem.ts | 52 +++++++++ .../timeline/updateStatusProperty.ts | 8 +- src/utils/slices/instancesSlice.ts | 18 ++-- 17 files changed, 220 insertions(+), 71 deletions(-) create mode 100644 src/utils/queryHooks/timeline/editItem.ts diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index 518305dd..cb9cb39d 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -302,7 +302,7 @@ const ParseHTML = React.memo( /> ) }, - () => true + (prev, next) => prev.content === next.content ) export default ParseHTML diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index 576f3247..31c1ccbb 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -72,7 +72,7 @@ const TimelineContent = React.memo( ) }, - () => true + (prev, next) => prev.status.content === next.status.content ) export default TimelineContent diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index cf4b5596..8ee94ff5 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -167,11 +167,23 @@ }, "status": { "heading": "About toot", + "edit": { + "function": "Edit toot", + "button": "Edit this toot" + }, "delete": { "function": "Delete toot", - "button": "Delete this toot" + "button": "Delete this toot", + "alert": { + "title": "Confirm deleting toot?", + "message": "Are you sure to delete this toot? All boosts and favourites will be cleared, including all replies.", + "buttons": { + "confirm": "Confirm deleting", + "cancel": "$t(common:buttons.cancel)" + } + } }, - "edit": { + "deleteEdit": { "function": "Delete toot", "button": "Delete and re-draft", "alert": { diff --git a/src/i18n/en/screens/compose.json b/src/i18n/en/screens/compose.json index a0e41ae1..15eb4537 100644 --- a/src/i18n/en/screens/compose.json +++ b/src/i18n/en/screens/compose.json @@ -16,6 +16,7 @@ "default": "Toot", "conversation": "Toot DM", "reply": "Toot reply", + "deleteEdit": "Toot", "edit": "Toot" }, "alert": { diff --git a/src/i18n/ko/components/timeline.json b/src/i18n/ko/components/timeline.json index f78c80a4..4a0d1729 100644 --- a/src/i18n/ko/components/timeline.json +++ b/src/i18n/ko/components/timeline.json @@ -160,7 +160,7 @@ "function": "툿 삭제", "button": "이 툿 삭제" }, - "edit": { + "deleteEdit": { "function": "툿 삭제", "button": "삭제하고 다시 쓰기", "alert": { diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index a1eb9053..d3e84f49 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -162,7 +162,7 @@ "function": "Xóa tút", "button": "Xóa tút này" }, - "edit": { + "deleteEdit": { "function": "Xóa tút", "button": "Xóa và viết lại", "alert": { diff --git a/src/i18n/zh-Hans/components/timeline.json b/src/i18n/zh-Hans/components/timeline.json index dd2756d6..d39a21c3 100644 --- a/src/i18n/zh-Hans/components/timeline.json +++ b/src/i18n/zh-Hans/components/timeline.json @@ -162,7 +162,7 @@ "function": "删除", "button": "删除此条嘟文" }, - "edit": { + "deleteEdit": { "function": "删除", "button": "删除并重新编辑此条嘟文", "alert": { diff --git a/src/screens/Actions/Status.tsx b/src/screens/Actions/Status.tsx index d509c549..da423c41 100644 --- a/src/screens/Actions/Status.tsx +++ b/src/screens/Actions/Status.tsx @@ -14,6 +14,8 @@ import { useTheme } from '@utils/styles/ThemeManager' import apiInstance from '@api/instance' import { NativeStackNavigationProp } from '@react-navigation/native-stack' import { RootStackParamList } from '@utils/navigation/navigators' +import { useSelector } from 'react-redux' +import { checkInstanceFeature } from '@utils/slices/instancesSlice' export interface Props { navigation: NativeStackNavigationProp @@ -59,22 +61,89 @@ const ActionsStatus: React.FC = ({ } }) + const canEditPost = useSelector(checkInstanceFeature('edit_post')) + return ( + {canEditPost ? ( + { + analytics('timeline_shared_headeractions_status_edit_press', { + page: queryKey && queryKey[1].page + }) + let replyToStatus: Mastodon.Status | undefined = undefined + if (status.in_reply_to_id) { + replyToStatus = await apiInstance({ + method: 'get', + url: `statuses/${status.in_reply_to_id}` + }).then(res => res.body) + } + apiInstance<{ + id: Mastodon.Status['id'] + text: NonNullable + spoiler_text: Mastodon.Status['spoiler_text'] + }>({ + method: 'get', + url: `statuses/${status.id}/source` + }).then(res => { + dismiss() + navigation.navigate('Screen-Compose', { + type: 'edit', + incomingStatus: { + ...status, + text: res.body.text, + spoiler_text: res.body.spoiler_text + }, + ...(replyToStatus && { replyToStatus }), + queryKey, + rootQueryKey + }) + }) + }} + iconFront='Edit3' + title={t('shared.header.actions.status.edit.button')} + /> + ) : null} { analytics('timeline_shared_headeractions_status_delete_press', { page: queryKey && queryKey[1].page }) - dismiss() - mutation.mutate({ - type: 'deleteItem', - source: 'statuses', - queryKey, - rootQueryKey, - id: status.id - }) + Alert.alert( + t('shared.header.actions.status.delete.alert.title'), + t('shared.header.actions.status.delete.alert.message'), + [ + { + text: t( + 'shared.header.actions.status.delete.alert.buttons.cancel' + ), + style: 'cancel' + }, + { + text: t( + 'shared.header.actions.status.delete.alert.buttons.confirm' + ), + style: 'destructive', + onPress: async () => { + analytics( + 'timeline_shared_headeractions_status_delete_confirm', + { + page: queryKey && queryKey[1].page + } + ) + dismiss() + mutation.mutate({ + type: 'deleteItem', + source: 'statuses', + queryKey, + rootQueryKey, + id: status.id + }) + } + } + ] + ) }} iconFront='Trash' title={t('shared.header.actions.status.delete.button')} @@ -85,18 +154,18 @@ const ActionsStatus: React.FC = ({ page: queryKey && queryKey[1].page }) Alert.alert( - t('shared.header.actions.status.edit.alert.title'), - t('shared.header.actions.status.edit.alert.message'), + t('shared.header.actions.status.deleteEdit.alert.title'), + t('shared.header.actions.status.deleteEdit.alert.message'), [ { text: t( - 'shared.header.actions.status.edit.alert.buttons.cancel' + 'shared.header.actions.status.deleteEdit.alert.buttons.cancel' ), style: 'cancel' }, { text: t( - 'shared.header.actions.status.edit.alert.buttons.confirm' + 'shared.header.actions.status.deleteEdit.alert.buttons.confirm' ), style: 'destructive', onPress: async () => { @@ -106,7 +175,7 @@ const ActionsStatus: React.FC = ({ page: queryKey && queryKey[1].page } ) - let replyToStatus: Mastodon.Status + let replyToStatus: Mastodon.Status | undefined = undefined if (status.in_reply_to_id) { replyToStatus = await apiInstance({ method: 'get', @@ -122,10 +191,9 @@ const ActionsStatus: React.FC = ({ }) .then(res => { dismiss() - // @ts-ignore navigation.navigate('Screen-Compose', { - type: 'edit', - incomingStatus: res.body, + type: 'deleteEdit', + incomingStatus: res.body as Mastodon.Status, ...(replyToStatus && { replyToStatus }), queryKey }) @@ -136,7 +204,7 @@ const ActionsStatus: React.FC = ({ ) }} iconFront='Edit' - title={t('shared.header.actions.status.edit.button')} + title={t('shared.header.actions.status.deleteEdit.button')} /> { diff --git a/src/screens/Compose.tsx b/src/screens/Compose.tsx index 92b23b8c..dab9093d 100644 --- a/src/screens/Compose.tsx +++ b/src/screens/Compose.tsx @@ -1,11 +1,14 @@ import analytics from '@components/analytics' -import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header' +import { HeaderLeft, HeaderRight } from '@components/Header' import { createNativeStackNavigator } from '@react-navigation/native-stack' import haptics from '@root/components/haptics' import formatText from '@screens/Compose/formatText' import ComposeRoot from '@screens/Compose/Root' import { RootStackScreenProps } from '@utils/navigation/navigators' -import { QueryKeyTimeline } from '@utils/queryHooks/timeline' +import { + QueryKeyTimeline, + useTimelineMutation +} from '@utils/queryHooks/timeline' import { updateStoreReview } from '@utils/slices/contextsSlice' import { getInstanceAccount, @@ -133,6 +136,7 @@ const ScreenCompose: React.FC> = ({ useEffect(() => { switch (params?.type) { case 'edit': + case 'deleteEdit': if (params.incomingStatus.spoiler_text) { formatText({ textInput: 'spoiler', @@ -268,6 +272,7 @@ const ScreenCompose: React.FC> = ({ } return false }, [totalTextCount, composeState.attachments.uploads, composeState.text.raw]) + const mutateTimeline = useTimelineMutation({ onMutate: true }) const headerRight = useCallback( () => ( > = ({ composeDispatch({ type: 'posting', payload: true }) composePost(params, composeState) - .then(() => { + .then(res => { haptics('Success') if ( Platform.OS === 'ios' && @@ -300,6 +305,15 @@ const ScreenCompose: React.FC> = ({ switch (params?.type) { case 'edit': + console.log('firing mutation') + mutateTimeline.mutate({ + type: 'editItem', + queryKey: params.queryKey, + rootQueryKey: params.rootQueryKey, + status: res.body + }) + break + case 'deleteEdit': case 'reply': if (params?.queryKey && params.queryKey[1].page === 'Toot') { queryClient.invalidateQueries(params.queryKey) diff --git a/src/screens/Compose/utils/parseState.ts b/src/screens/Compose/utils/parseState.ts index ae874d18..285206de 100644 --- a/src/screens/Compose/utils/parseState.ts +++ b/src/screens/Compose/utils/parseState.ts @@ -39,6 +39,7 @@ const composeParseState = ( ): ComposeState => { switch (params.type) { case 'edit': + case 'deleteEdit': return { ...composeInitialState, dirty: true, diff --git a/src/screens/Compose/utils/post.ts b/src/screens/Compose/utils/post.ts index 9be1334c..d1ee13c4 100644 --- a/src/screens/Compose/utils/post.ts +++ b/src/screens/Compose/utils/post.ts @@ -51,8 +51,11 @@ const composePost = async ( formData.append('visibility', composeState.visibility) return apiInstance({ - method: 'post', - url: 'statuses', + method: params?.type === 'edit' ? 'put' : 'post', + url: + params?.type === 'edit' + ? `statuses/${params.incomingStatus.id}` + : 'statuses', headers: { 'Idempotency-Key': await Crypto.digestStringAsync( Crypto.CryptoDigestAlgorithm.SHA256, @@ -67,7 +70,9 @@ const composePost = async ( composeState.attachments.sensitive + composeState.attachments.uploads.map(upload => upload.remote?.id) + composeState.visibility + - (params?.type === 'edit' ? Math.random() : '') + (params?.type === 'edit' || params?.type === 'deleteEdit' + ? Math.random() + : '') ) }, body: formData diff --git a/src/utils/navigation/navigators.ts b/src/utils/navigation/navigators.ts index b4956ac7..ef8e7a5b 100644 --- a/src/utils/navigation/navigators.ts +++ b/src/utils/navigation/navigators.ts @@ -26,31 +26,20 @@ export type RootStackParamList = { type: 'edit' incomingStatus: Mastodon.Status replyToStatus?: Mastodon.Status - queryKey?: [ - 'Timeline', - { - page: App.Pages - hashtag?: Mastodon.Tag['name'] - list?: Mastodon.List['id'] - toot?: Mastodon.Status['id'] - account?: Mastodon.Account['id'] - } - ] + queryKey?: QueryKeyTimeline + rootQueryKey?: QueryKeyTimeline + } + | { + type: 'deleteEdit' + incomingStatus: Mastodon.Status + replyToStatus?: Mastodon.Status + queryKey?: QueryKeyTimeline } | { type: 'reply' incomingStatus: Mastodon.Status accts: Mastodon.Account['acct'][] - queryKey?: [ - 'Timeline', - { - page: App.Pages - hashtag?: Mastodon.Tag['name'] - list?: Mastodon.List['id'] - toot?: Mastodon.Status['id'] - account?: Mastodon.Account['id'] - } - ] + queryKey?: QueryKeyTimeline } | { type: 'conversation' diff --git a/src/utils/queryHooks/timeline.ts b/src/utils/queryHooks/timeline.ts index 384db03e..b2956faa 100644 --- a/src/utils/queryHooks/timeline.ts +++ b/src/utils/queryHooks/timeline.ts @@ -13,6 +13,7 @@ import { useMutation } from 'react-query' import deleteItem from './timeline/deleteItem' +import editItem from './timeline/editItem' import updateStatusProperty from './timeline/updateStatusProperty' export type QueryKeyTimeline = [ @@ -303,13 +304,21 @@ export type MutationVarsTimelineUpdateAccountProperty = { } } +export type MutationVarsTimelineEditItem = { + // This is for editing status + type: 'editItem' + queryKey?: QueryKeyTimeline + rootQueryKey?: QueryKeyTimeline + status: Mastodon.Status +} + export type MutationVarsTimelineDeleteItem = { // This is for deleting status and conversation type: 'deleteItem' source: 'statuses' | 'conversations' queryKey?: QueryKeyTimeline rootQueryKey?: QueryKeyTimeline - id: Mastodon.Conversation['id'] + id: Mastodon.Status['id'] } export type MutationVarsTimelineDomainBlock = { @@ -322,6 +331,7 @@ export type MutationVarsTimelineDomainBlock = { export type MutationVarsTimeline = | MutationVarsTimelineUpdateStatusProperty | MutationVarsTimelineUpdateAccountProperty + | MutationVarsTimelineEditItem | MutationVarsTimelineDeleteItem | MutationVarsTimelineDomainBlock @@ -371,6 +381,8 @@ const mutationFunction = async (params: MutationVarsTimeline) => { } }) } + case 'editItem': + return { body: params.status } case 'deleteItem': return apiInstance({ method: 'delete', @@ -423,6 +435,9 @@ const useTimelineMutation = ({ case 'updateStatusProperty': updateStatusProperty(params) break + case 'editItem': + editItem(params) + break case 'deleteItem': deleteItem(params) break diff --git a/src/utils/queryHooks/timeline/deleteItem.ts b/src/utils/queryHooks/timeline/deleteItem.ts index fa2ddaa3..d2911bf8 100644 --- a/src/utils/queryHooks/timeline/deleteItem.ts +++ b/src/utils/queryHooks/timeline/deleteItem.ts @@ -6,11 +6,7 @@ const deleteItem = ({ queryKey, rootQueryKey, id -}: { - queryKey?: MutationVarsTimelineDeleteItem['queryKey'] - rootQueryKey?: MutationVarsTimelineDeleteItem['rootQueryKey'] - id: MutationVarsTimelineDeleteItem['id'] -}) => { +}: MutationVarsTimelineDeleteItem) => { queryKey && queryClient.setQueryData | undefined>(queryKey, old => { if (old) { diff --git a/src/utils/queryHooks/timeline/editItem.ts b/src/utils/queryHooks/timeline/editItem.ts new file mode 100644 index 00000000..0ea5a818 --- /dev/null +++ b/src/utils/queryHooks/timeline/editItem.ts @@ -0,0 +1,52 @@ +import queryClient from '@helpers/queryClient' +import { InfiniteData } from 'react-query' +import { MutationVarsTimelineEditItem } from '../timeline' + +const editItem = ({ + queryKey, + rootQueryKey, + status +}: MutationVarsTimelineEditItem) => { + console.log('START') + queryKey && + queryClient.setQueryData | undefined>(queryKey, old => { + if (old) { + old.pages = old.pages.map(page => { + page.body = page.body.map((item: Mastodon.Status) => { + if (item.id === status.id) { + console.log('found queryKey', queryKey) + console.log('new content', status.content) + item = status + } + return item + }) + return page + }) + return old + } + }) + + rootQueryKey && + queryClient.setQueryData | undefined>( + rootQueryKey, + old => { + if (old) { + old.pages = old.pages.map(page => { + page.body = page.body.map((item: Mastodon.Status) => { + if (item.id === status.id) { + console.log('found rootQueryKey', queryKey) + console.log('new content', status.content) + item = status + } + return item + }) + return page + }) + return old + } + } + ) + console.log('EDN') +} + +export default editItem diff --git a/src/utils/queryHooks/timeline/updateStatusProperty.ts b/src/utils/queryHooks/timeline/updateStatusProperty.ts index 893aa52d..2a697404 100644 --- a/src/utils/queryHooks/timeline/updateStatusProperty.ts +++ b/src/utils/queryHooks/timeline/updateStatusProperty.ts @@ -14,13 +14,7 @@ const updateStatusProperty = ({ id, reblog, payload -}: { - queryKey: MutationVarsTimelineUpdateStatusProperty['queryKey'] - rootQueryKey?: MutationVarsTimelineUpdateStatusProperty['rootQueryKey'] - id: MutationVarsTimelineUpdateStatusProperty['id'] - reblog?: MutationVarsTimelineUpdateStatusProperty['reblog'] - payload: MutationVarsTimelineUpdateStatusProperty['payload'] -}) => { +}: MutationVarsTimelineUpdateStatusProperty) => { queryClient.setQueryData | undefined>( queryKey, old => { diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index 5d62ee10..605c036a 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -344,14 +344,16 @@ export const getInstanceVersion = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.version export const checkInstanceFeature = (feature: string) => - ({ instances: { instances } }: RootState) => { - return features - .filter(f => f.feature === feature) - .filter( - f => - parseFloat(instances[findInstanceActive(instances)]?.version) >= - f.version - ) + ({ instances: { instances } }: RootState): Boolean => { + return ( + features + .filter(f => f.feature === feature) + .filter( + f => + parseFloat(instances[findInstanceActive(instances)]?.version) >= + f.version + ).length > 0 + ) } /* Get Instance Configuration */ From f93d6f7db87ea776af247083ac33b90047012da6 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 30 Apr 2022 21:29:08 +0200 Subject: [PATCH 13/36] Editing can update media --- src/components/GracefullyImage.tsx | 194 +++++----- src/components/Timeline/Shared/Attachment.tsx | 260 ++++++------- .../Timeline/Shared/Attachment/Image.tsx | 81 ++--- .../Timeline/Shared/HeaderConversation.tsx | 212 +++++------ .../Timeline/Shared/HeaderDefault.tsx | 122 +++---- .../Timeline/Shared/HeaderNotification.tsx | 192 +++++----- src/screens/Actions.tsx | 344 +++++++++--------- src/screens/Compose.tsx | 1 - src/utils/queryHooks/timeline/editItem.ts | 6 - 9 files changed, 666 insertions(+), 746 deletions(-) diff --git a/src/components/GracefullyImage.tsx b/src/components/GracefullyImage.tsx index 081d7feb..5fa68666 100644 --- a/src/components/GracefullyImage.tsx +++ b/src/components/GracefullyImage.tsx @@ -1,6 +1,6 @@ import { useAccessibility } from '@utils/accessibility/AccessibilityManager' import { useTheme } from '@utils/styles/ThemeManager' -import React, { useCallback, useMemo, useState } from 'react' +import React, { useMemo, useState } from 'react' import { AccessibilityProps, Image, @@ -39,125 +39,103 @@ export interface Props { > } -const GracefullyImage = React.memo( - ({ - accessibilityLabel, - accessibilityHint, - hidden = false, - uri, - blurhash, - dimension, - onPress, - style, - imageStyle, - setImageDimensions - }: Props) => { - const { reduceMotionEnabled } = useAccessibility() - const { colors } = useTheme() - const [originalFailed, setOriginalFailed] = useState(false) - const [imageLoaded, setImageLoaded] = useState(false) +const GracefullyImage = ({ + accessibilityLabel, + accessibilityHint, + hidden = false, + uri, + blurhash, + dimension, + onPress, + style, + imageStyle, + setImageDimensions +}: Props) => { + const { reduceMotionEnabled } = useAccessibility() + const { colors } = useTheme() + const [originalFailed, setOriginalFailed] = useState(false) + const [imageLoaded, setImageLoaded] = useState(false) - const source = useMemo(() => { - if (originalFailed) { - return { uri: uri.remote || undefined } - } else { - return { - uri: reduceMotionEnabled && uri.static ? uri.static : uri.original - } + const source = originalFailed + ? { uri: uri.remote || undefined } + : { + uri: reduceMotionEnabled && uri.static ? uri.static : uri.original } - }, [originalFailed]) - const onLoad = useCallback(() => { - setImageLoaded(true) - if (setImageDimensions && source.uri) { - Image.getSize(source.uri, (width, height) => - setImageDimensions({ width, height }) + const onLoad = () => { + setImageLoaded(true) + if (setImageDimensions && source.uri) { + Image.getSize(source.uri, (width, height) => + setImageDimensions({ width, height }) + ) + } + } + const onError = () => { + if (!originalFailed) { + setOriginalFailed(true) + } + } + + const blurhashView = useMemo(() => { + if (hidden || !imageLoaded) { + if (blurhash) { + return ( + ) - } - }, [source.uri]) - const onError = useCallback(() => { - if (!originalFailed) { - setOriginalFailed(true) - } - }, [originalFailed]) - - const previewView = useMemo( - () => - uri.preview && !imageLoaded ? ( - - ) : null, - [] - ) - const originalView = useMemo( - () => ( + ) + } + } else { + return null + } + }, [hidden, imageLoaded]) + + return ( + + ) +} const styles = StyleSheet.create({ placeholder: { diff --git a/src/components/Timeline/Shared/Attachment.tsx b/src/components/Timeline/Shared/Attachment.tsx index d1a9e322..a4a4b670 100644 --- a/src/components/Timeline/Shared/Attachment.tsx +++ b/src/components/Timeline/Shared/Attachment.tsx @@ -10,10 +10,9 @@ import { StackNavigationProp } from '@react-navigation/stack' import { RootStackParamList } from '@utils/navigation/navigators' import { StyleConstants } from '@utils/styles/constants' import layoutAnimation from '@utils/styles/layoutAnimation' -import React, { useCallback, useMemo, useRef, useState } from 'react' -import { useEffect } from 'react' +import React, { useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import { Pressable, StyleSheet, View } from 'react-native' +import { Pressable, View } from 'react-native' export interface Props { status: Pick @@ -24,24 +23,13 @@ const TimelineAttachment = React.memo( const { t } = useTranslation('componentTimeline') const [sensitiveShown, setSensitiveShown] = useState(status.sensitive) - const onPressBlurView = useCallback(() => { - analytics('timeline_shared_attachment_blurview_press_show') - layoutAnimation() - setSensitiveShown(false) - haptics('Light') - }, []) - const onPressShow = useCallback(() => { - analytics('timeline_shared_attachment_blurview_press_hide') - setSensitiveShown(true) - haptics('Light') - }, []) const imageUrls = useRef< RootStackParamList['Screen-ImagesViewer']['imageUrls'] >([]) const navigation = useNavigation>() - useEffect(() => { - status.media_attachments.forEach((attachment, index) => { + const navigateToImagesViewer = (id: string) => { + status.media_attachments.forEach(attachment => { switch (attachment.type) { case 'image': imageUrls.current.push({ @@ -55,117 +43,136 @@ const TimelineAttachment = React.memo( }) } }) - }, []) - const navigateToImagesViewer = (id: string) => navigation.navigate('Screen-ImagesViewer', { imageUrls: imageUrls.current, id }) - const attachments = useMemo( - () => - status.media_attachments.map((attachment, index) => { - switch (attachment.type) { - case 'image': - return ( - - ) - case 'video': - return ( - - ) - case 'gifv': - return ( - - ) - case 'audio': - return ( - - ) - default: - if ( - attachment.preview_url?.endsWith('.jpg') || - attachment.preview_url?.endsWith('.jpeg') || - attachment.preview_url?.endsWith('.png') || - attachment.preview_url?.endsWith('.gif') || - attachment.remote_url?.endsWith('.jpg') || - attachment.remote_url?.endsWith('.jpeg') || - attachment.remote_url?.endsWith('.png') || - attachment.remote_url?.endsWith('.gif') - ) { - imageUrls.current.push({ - id: attachment.id, - preview_url: attachment.preview_url, - url: attachment.url, - remote_url: attachment.remote_url, - blurhash: attachment.blurhash, - width: attachment.meta?.original?.width, - height: attachment.meta?.original?.height - }) + } + + return ( + + + {status.media_attachments.map((attachment, index) => { + switch (attachment.type) { + case 'image': return ( ) - } else { + case 'video': return ( - ) - } - } - }), - [sensitiveShown] - ) - - return ( - - + case 'gifv': + return ( + + ) + case 'audio': + return ( + + ) + default: + if ( + attachment.preview_url?.endsWith('.jpg') || + attachment.preview_url?.endsWith('.jpeg') || + attachment.preview_url?.endsWith('.png') || + attachment.preview_url?.endsWith('.gif') || + attachment.remote_url?.endsWith('.jpg') || + attachment.remote_url?.endsWith('.jpeg') || + attachment.remote_url?.endsWith('.png') || + attachment.remote_url?.endsWith('.gif') + ) { + imageUrls.current.push({ + id: attachment.id, + preview_url: attachment.preview_url, + url: attachment.url, + remote_url: attachment.remote_url, + blurhash: attachment.blurhash, + width: attachment.meta?.original?.width, + height: attachment.meta?.original?.height + }) + return ( + + ) + } else { + return ( + + ) + } + } + })} + {status.sensitive && (sensitiveShown ? ( - +