From db6b5e4e708b49c298100af5af9d1661e32f5a6c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 27 Oct 2022 22:18:38 +0200 Subject: [PATCH 01/25] Bump packages --- ios/Podfile.lock | 38 ++-- package.json | 42 ++-- yarn.lock | 498 ++++++++++++++++++++++++++--------------------- 3 files changed, 314 insertions(+), 264 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 15433266..51634f3a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -24,7 +24,7 @@ PODS: - ExpoModulesCore - EXNotifications (0.16.1): - ExpoModulesCore - - Expo (46.0.15): + - Expo (46.0.16): - ExpoModulesCore - ExpoCrypto (11.0.0): - ExpoModulesCore @@ -34,7 +34,7 @@ PODS: - ExpoModulesCore - ExpoLocalization (13.1.0): - ExpoModulesCore - - ExpoModulesCore (0.11.7): + - ExpoModulesCore (0.11.8): - React-Core - ReactCommon/turbomodule/core - ExpoRandom (12.3.0): @@ -416,7 +416,7 @@ PODS: - React-Core - react-native-language-detection (0.1.0): - React - - react-native-netinfo (9.3.4): + - react-native-netinfo (9.3.6): - React-Core - react-native-pager-view (6.0.1): - React-Core @@ -536,9 +536,9 @@ PODS: - React-Core - SDWebImage (~> 5.13.4) - SDWebImageWebPCoder (~> 0.9.0) - - RNGestureHandler (2.7.1): + - RNGestureHandler (2.8.0): - React-Core - - RNReanimated (2.10.0): + - RNReanimated (2.12.0): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -565,12 +565,12 @@ PODS: - React-RCTText - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.18.1): + - RNScreens (3.18.2): - React-Core - React-RCTImage - - RNSentry (4.6.1): + - RNSentry (4.7.1): - React-Core - - Sentry (= 7.27.1) + - Sentry (= 7.28.0) - RNShareMenu (6.0.0): - React - RNSVG (13.0.0): @@ -581,9 +581,9 @@ PODS: - SDWebImageWebPCoder (0.9.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.13) - - Sentry (7.27.1): - - Sentry/Core (= 7.27.1) - - Sentry/Core (7.27.1) + - Sentry (7.28.0): + - Sentry/Core (= 7.28.0) + - Sentry/Core (7.28.0) - Swime (3.0.6) - Yoga (1.14.0) @@ -857,12 +857,12 @@ SPEC CHECKSUMS: EXFirebaseCore: cb1e6afad20c4c32a4966432c78ebfff29d8db6b EXFont: 06df627203afcb8a3b3152ec06eb2f11f46f0cff EXNotifications: 9a2aa201deb19dfe1dbe0e370eeb2922de0d2422 - Expo: 7e821e708a35d2720ef6baa658e224dd91c4821e + Expo: 7ac824960a6059d6c68e73f432c8e6bf6d92a0ef ExpoCrypto: e534314db0e1a17ae12b5140d529bd0c5efcbc6a ExpoHaptics: efe9e68e9dfe0d15c183c0c70a25f3874124ab9e ExpoKeepAwake: 0e8f18142e71bbf2c7f6aa66ebed249ba1420320 ExpoLocalization: 63204f4b9d4f653469d266332ceaa6c6ac8a305d - ExpoModulesCore: 2d60ec04c49641afb55fee3faac86fb108c68fe0 + ExpoModulesCore: 39ec590ce622289c060183aba57f77b1e73b4e11 ExpoRandom: f9f1faa299a40733867f344d6b7bfa2d1f4ab04d ExpoWebBrowser: 5804ac42a8269d0e534bc4461993005f72535649 EXScreenCapture: 23de056fdb02edd1fb8f147b0fd198c6d5cada3d @@ -909,7 +909,7 @@ SPEC CHECKSUMS: react-native-context-menu-view: b0beca02aad4bd9f9d7d932bf437e0a03baa69ef react-native-image-picker: 4bc9ed38c8be255b515d8c88babbaf74973f91a8 react-native-language-detection: 0e43195ad014974f1b7a31b64820eff34a243f2d - react-native-netinfo: 6ac9bcc7c88dc51717bda3484eb99093acb755e0 + react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461 react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca react-native-paste-input: 183ad7dc224e192719616f4258dde5b548627d08 react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a @@ -929,15 +929,15 @@ SPEC CHECKSUMS: RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd RNFastImage: e6267e27581b81918ebef6432c94c20718ec3b91 - RNGestureHandler: b7a872907ee289ada902127f2554fa1d2c076122 - RNReanimated: 7faa787e8d4493fbc95fab2ad331fa7625828cfa - RNScreens: 1b7bb502dac62cc4cf01b94bea591c8da275132f - RNSentry: f8591057d48d4f6d64196a76cbca67895667b033 + RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3 + RNReanimated: c3e58924b9418883b0bde9e78c4c957302f02435 + RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d + RNSentry: 694aecc3d8240e4935374974a6636e360ae06394 RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3 RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff SDWebImage: e5cc87bf736e60f49592f307bdf9e157189298a3 SDWebImageWebPCoder: 18503de6621dd2c420d680e33d46bf8e1d5169b0 - Sentry: bc644307e2eb6a4c9c55cf117a80b895bb2a25a7 + Sentry: 2c6053e4cfe6dea6608135dea1928ffbb4ecfba5 Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d diff --git a/package.json b/package.json index c06353a5..18b889db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tooot", - "version": "4.3.4", + "version": "4.5.0", "description": "tooot for Mastodon", "author": "xmflsct ", "license": "GPL-3.0-or-later", @@ -18,30 +18,30 @@ "postinstall": "patch-package" }, "dependencies": { - "@expo/react-native-action-sheet": "^3.14.0", - "@formatjs/intl-datetimeformat": "^6.2.0", + "@expo/react-native-action-sheet": "^4.0.0", + "@formatjs/intl-datetimeformat": "^6.3.1", "@formatjs/intl-getcanonicallocales": "^2.0.4", - "@formatjs/intl-locale": "^3.0.6", - "@formatjs/intl-numberformat": "^8.1.3", - "@formatjs/intl-pluralrules": "^5.1.3", - "@formatjs/intl-relativetimeformat": "^11.1.3", + "@formatjs/intl-locale": "^3.0.7", + "@formatjs/intl-numberformat": "^8.2.0", + "@formatjs/intl-pluralrules": "^5.1.4", + "@formatjs/intl-relativetimeformat": "^11.1.4", "@mattermost/react-native-paste-input": "^0.5.1", "@neverdull-agency/expo-unlimited-secure-store": "^1.0.10", "@react-native-async-storage/async-storage": "^1.17.10", "@react-native-camera-roll/camera-roll": "^5.0.4", "@react-native-clipboard/clipboard": "^1.11.1", "@react-native-community/blur": "^4.2.0", - "@react-native-community/netinfo": "^9.3.4", + "@react-native-community/netinfo": "^9.3.6", "@react-native-community/segmented-control": "^2.2.2", "@react-navigation/bottom-tabs": "^6.4.0", "@react-navigation/native": "^6.0.13", "@react-navigation/native-stack": "^6.9.1", - "@react-navigation/stack": "^6.3.2", + "@react-navigation/stack": "^6.3.3", "@reduxjs/toolkit": "^1.8.6", - "@sentry/react-native": "^4.6.1", + "@sentry/react-native": "^4.7.1", "@sharcoux/slider": "^6.0.3", "axios": "^0.27.2", - "expo": "^46.0.15", + "expo": "^46.0.16", "expo-auth-session": "^3.7.1", "expo-av": "^12.0.4", "expo-constants": "^13.2.4", @@ -59,14 +59,14 @@ "expo-store-review": "^5.3.0", "expo-video-thumbnails": "^6.4.0", "expo-web-browser": "^11.0.0", - "i18next": "^21.10.0", + "i18next": "^22.0.3", "li": "^1.3.0", "linkify-it": "^4.0.1", "lodash": "^4.17.21", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-i18next": "^11.18.6", - "react-intl": "^6.1.2", + "react-i18next": "^12.0.0", + "react-intl": "^6.2.1", "react-native": "^0.69.6", "react-native-animated-spinkit": "^1.5.2", "react-native-base64": "^0.2.1", @@ -75,15 +75,15 @@ "react-native-fast-image": "^8.6.1", "react-native-feather": "^1.1.2", "react-native-flash-message": "^0.3.1", - "react-native-gesture-handler": "^2.7.1", + "react-native-gesture-handler": "^2.8.0", "react-native-htmlview": "^0.16.0", "react-native-image-picker": "^4.10.0", "react-native-language-detection": "^0.1.0", "react-native-pager-view": "^6.0.1", - "react-native-reanimated": "^2.10.0", + "react-native-reanimated": "^2.12.0", "react-native-reanimated-zoom": "^0.3.1", "react-native-safe-area-context": "^4.4.1", - "react-native-screens": "^3.18.1", + "react-native-screens": "^3.18.2", "react-native-share-menu": "^6.0.0", "react-native-svg": "13.0.0", "react-native-swipe-list-view": "^3.2.9", @@ -95,15 +95,15 @@ "valid-url": "^1.0.9" }, "devDependencies": { - "@babel/core": "^7.19.3", + "@babel/core": "^7.19.6", "@babel/plugin-proposal-optional-chaining": "^7.18.9", "@babel/preset-react": "^7.18.6", "@babel/preset-typescript": "^7.18.6", "@expo/config": "^7.0.1", "@types/linkify-it": "^3.0.2", "@types/lodash": "^4.14.186", - "@types/react": "^18.0.21", - "@types/react-dom": "^18.0.6", + "@types/react": "^18.0.24", + "@types/react-dom": "^18.0.8", "@types/react-native": "^0.69.5", "@types/react-native-base64": "^0.2.0", "@types/react-native-share-menu": "^5.0.2", @@ -114,7 +114,7 @@ "babel-plugin-transform-remove-console": "^6.9.4", "chalk": "^4.1.2", "dotenv": "^16.0.3", - "patch-package": "^6.4.7", + "patch-package": "^6.5.0", "postinstall-postinstall": "^2.1.0", "react-native-clean-project": "^4.0.1", "typescript": "^4.8.4" diff --git a/yarn.lock b/yarn.lock index aa775212..ffee5507 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,21 +55,21 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/core@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.3.tgz#2519f62a51458f43b682d61583c3810e7dcee64c" - integrity sha512-WneDJxdsjEvyKtXKsaBGbDeiyOjR5vYq4HcShxnIbG0qixpoHjI3MqeZM9NDvsojNCEBItQE4juOo/bU6e72gQ== +"@babel/core@^7.19.6": + version "7.19.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.19.6.tgz#7122ae4f5c5a37c0946c066149abd8e75f81540f" + integrity sha512-D2Ue4KHpc6Ys2+AxpIx1BZ8+UegLLLE2p3KJEuJRKmokHOtl49jQ5ny1773KsGLZs8MQvBidAF6yWUJxRqtKtg== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.3" + "@babel/generator" "^7.19.6" "@babel/helper-compilation-targets" "^7.19.3" - "@babel/helper-module-transforms" "^7.19.0" - "@babel/helpers" "^7.19.0" - "@babel/parser" "^7.19.3" + "@babel/helper-module-transforms" "^7.19.6" + "@babel/helpers" "^7.19.4" + "@babel/parser" "^7.19.6" "@babel/template" "^7.18.10" - "@babel/traverse" "^7.19.3" - "@babel/types" "^7.19.3" + "@babel/traverse" "^7.19.6" + "@babel/types" "^7.19.4" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -85,12 +85,12 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.3.tgz#d7f4d1300485b4547cb6f94b27d10d237b42bf59" - integrity sha512-fqVZnmp1ncvZU757UzDheKZpfPgatqY59XtW2/j/18H7u76akb8xqvjw82f+i2UKd/ksYsSick/BCLQUUtJ/qQ== +"@babel/generator@^7.19.6", "@babel/generator@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.0.tgz#0bfc5379e0efb05ca6092091261fcdf7ec36249d" + integrity sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w== dependencies: - "@babel/types" "^7.19.3" + "@babel/types" "^7.20.0" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" @@ -217,6 +217,20 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helper-module-transforms@^7.19.6": + version "7.19.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.6.tgz#6c52cc3ac63b70952d33ee987cbee1c9368b533f" + integrity sha512-fCmcfQo/KYr/VXXDIyd3CBGZ6AFhPFy1TfSEJ+PilGVlQT6jcbqtHAM4C1EciRqMza7/TpOUZliuSH+U6HAhJw== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.19.4" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.19.1" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.19.6" + "@babel/types" "^7.19.4" + "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" @@ -257,6 +271,13 @@ dependencies: "@babel/types" "^7.18.6" +"@babel/helper-simple-access@^7.19.4": + version "7.19.4" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz#be553f4951ac6352df2567f7daa19a0ee15668e7" + integrity sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg== + dependencies: + "@babel/types" "^7.19.4" + "@babel/helper-skip-transparent-expression-wrappers@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.9.tgz#778d87b3a758d90b471e7b9918f34a9a02eb5818" @@ -276,6 +297,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== +"@babel/helper-string-parser@^7.19.4": + version "7.19.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" + integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" @@ -305,6 +331,15 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" +"@babel/helpers@^7.19.4": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.0.tgz#27c8ffa8cc32a2ed3762fba48886e7654dbcf77f" + integrity sha512-aGMjYraN0zosCEthoGLdqot1oRsmxVTQRHadsUPz5QM44Zej2PYRz7XiDE7GqnkZnNtLbOuxqoZw42vkU7+XEQ== + dependencies: + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.20.0" + "@babel/types" "^7.20.0" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" @@ -319,10 +354,10 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.1.tgz#6f6d6c2e621aad19a92544cc217ed13f1aac5b4c" integrity sha512-h7RCSorm1DdTVGJf3P2Mhj3kdnkmF/EiysUkzS2TdgAYqyjFdMQJbVuXOBej2SBJaXan/lIVtT6KkGbyyq753A== -"@babel/parser@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a" - integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== +"@babel/parser@^7.19.6", "@babel/parser@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.0.tgz#b26133c888da4d79b0d3edcf42677bcadc783046" + integrity sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -1129,19 +1164,19 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.3.tgz#3a3c5348d4988ba60884e8494b0592b2f15a04b4" - integrity sha512-qh5yf6149zhq2sgIXmwjnsvmnNQC2iw70UFjp4olxucKrWd/dvlUsBI88VSLUsnMNF7/vnOiA+nk1+yLoCqROQ== +"@babel/traverse@^7.19.6", "@babel/traverse@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.0.tgz#538c4c6ce6255f5666eba02252a7b59fc2d5ed98" + integrity sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ== dependencies: "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.19.3" + "@babel/generator" "^7.20.0" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.19.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.19.3" - "@babel/types" "^7.19.3" + "@babel/parser" "^7.20.0" + "@babel/types" "^7.20.0" debug "^4.1.0" globals "^11.1.0" @@ -1154,12 +1189,12 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" -"@babel/types@^7.19.3": - version "7.19.3" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" - integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== +"@babel/types@^7.19.4", "@babel/types@^7.20.0": + version "7.20.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.0.tgz#52c94cf8a7e24e89d2a194c25c35b17a64871479" + integrity sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg== dependencies: - "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" @@ -1180,10 +1215,10 @@ mv "~2" safe-json-stringify "~1" -"@expo/cli@0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.3.1.tgz#827cbfa4e538243962217d684e924f55b5bafaa7" - integrity sha512-amdsNf5quVs9ZbO+q35sdtpWJvvQz5pqtl8ZOv5jqRriIp1G9zcOFTDG0TnGxANQ0F2b5GcU4fn7pxAzRLDHmQ== +"@expo/cli@0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@expo/cli/-/cli-0.3.2.tgz#83c8587ec38f9c7361222751bc4bb829520201b8" + integrity sha512-P6yogdPCRKaoLjuH7D8jgq6kTzM4gWuQ+vssBPWhbnoymV5AClQOxvACPDHD+biKhvGsaXEQLMoi93lPQzcDlQ== dependencies: "@babel/runtime" "^7.14.0" "@expo/code-signing-certificates" "^0.0.2" @@ -1455,10 +1490,10 @@ semver "7.3.2" xml2js "0.4.23" -"@expo/react-native-action-sheet@^3.14.0": - version "3.14.0" - resolved "https://registry.yarnpkg.com/@expo/react-native-action-sheet/-/react-native-action-sheet-3.14.0.tgz#484781425fb31c2a76c4344cdfdbb3609509846e" - integrity sha512-JvABIv68dyxbdXg965+K7OYDJdlJftHesqmaWGv1KF4bobbwKli4NK/zQKSltlfiI+cLxONwzBlvmx+AjlYGng== +"@expo/react-native-action-sheet@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@expo/react-native-action-sheet/-/react-native-action-sheet-4.0.0.tgz#d51475ebe6ea29b78aeecd699519c9ae0e1fcc9d" + integrity sha512-y+w5BpkEN7SZ/+cZN5lOJlOsatO9TIfwlJRB1iq33ateAU5uVrN4yRGPPDDrX3q8hpGky5hXplJ5I+GFM4DqlQ== dependencies: "@types/hoist-non-react-statics" "^3.3.1" hoist-non-react-statics "^3.3.0" @@ -1510,10 +1545,10 @@ find-up "^5.0.0" js-yaml "^4.1.0" -"@formatjs/ecma402-abstract@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.12.0.tgz#2fb5e8983d5fae2fad9ec6c77aec1803c2b88d8e" - integrity sha512-0/wm9b7brUD40kx7KSE0S532T8EfH06Zc41rGlinoNyYXnuusR6ull2x63iFJgVXgwahm42hAW7dcYdZ+llZzA== +"@formatjs/ecma402-abstract@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.13.0.tgz#df6db3cbee0182bbd2fd6217103781c802aee819" + integrity sha512-CQ8Ykd51jYD1n05dtoX6ns6B9n/+6ZAxnWUAonvHC4kkuAemROYBhHkEB4tm1uVrRlE7gLDqXkAnY51Y0pRCWQ== dependencies: "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" @@ -1525,38 +1560,38 @@ dependencies: tslib "2.4.0" -"@formatjs/icu-messageformat-parser@2.1.8": - version "2.1.8" - resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.8.tgz#45cb678da4c760009b52fe6ca2c13aedbc200fee" - integrity sha512-T1R/UtPSCdznwjlfIJDl9XnjZdcFap+rPJrKC9uATr/sUdziVad3SfRQFf50JOuHptbk6knz+VdiYdApek4Sag== +"@formatjs/icu-messageformat-parser@2.1.10": + version "2.1.10" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.10.tgz#d11114343fcb4c6d5ccabdeac50badf49c83fd9e" + integrity sha512-KkRMxhifWkRC45dhM9tqm0GXbb6NPYTGVYY3xx891IKc6p++DQrZTnmkVSNNO47OEERLfuP2KkPFPJBuu8z/wg== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" - "@formatjs/icu-skeleton-parser" "1.3.13" + "@formatjs/ecma402-abstract" "1.13.0" + "@formatjs/icu-skeleton-parser" "1.3.14" tslib "2.4.0" -"@formatjs/icu-skeleton-parser@1.3.13": - version "1.3.13" - resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.13.tgz#f7e186e72ed73c3272d22a3aacb646e77368b099" - integrity sha512-qb1kxnA4ep76rV+d9JICvZBThBpK5X+nh1dLmmIReX72QyglicsaOmKEcdcbp7/giCWfhVs6CXPVA2JJ5/ZvAw== +"@formatjs/icu-skeleton-parser@1.3.14": + version "1.3.14" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.14.tgz#b99ef7f855f8a58cab2519ec4f921f11c2bf74a7" + integrity sha512-7bv60HQQcBb3+TSj+45tOb/CHV5z1hOpwdtS50jsSBXfB+YpGhnoRsZxSRksXeCxMy6xn6tA6VY2601BrrK+OA== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" tslib "2.4.0" -"@formatjs/intl-datetimeformat@^6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-6.2.0.tgz#4fce81c5045469bbc3afb4e539c3bcf0b961352a" - integrity sha512-5oPDeXiKKE8nOoN+a9K5HW7hr8B/Z6px4lxsHG5MJ4XspI9hnYkzpJpfKuARN33mz7ZkaGNrbt82I/4B0rtjCA== +"@formatjs/intl-datetimeformat@^6.3.1": + version "6.3.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-6.3.1.tgz#a5909ee5b6f26572758c2d8e809c7cd888e01b68" + integrity sha512-6uJS+ipQo4m8+F8sSbTOd+4osoDe/9V10Me0OYL2jFCgxC/fKemRVqqGccNOg4l3rQghGHnmrsJLsZ1ydBo5LQ== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" -"@formatjs/intl-displaynames@6.1.3": - version "6.1.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.1.3.tgz#c9d283db518cd721c0855e9854bfadb9ba304b6a" - integrity sha512-yBB165IH72fweGymRPrq8PQ4R5gKMR8vOj6XmkxGBICyJMhknc+RpG02g9Jsk/4jvO6qw/H0QtXHrHIg+Jv0sw== +"@formatjs/intl-displaynames@6.1.4": + version "6.1.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.1.4.tgz#26b2c7b814f5132b2e6d781bf4af7bce86f46852" + integrity sha512-sEbziGLsWQo6nA8ZUBcsDRlZzPg+uMVjDmbTalgGqRWLbdXuxMldTYdaCK+UptyJhkmNVM/erz3csTiyqamXHQ== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" @@ -1567,21 +1602,21 @@ dependencies: tslib "2.4.0" -"@formatjs/intl-listformat@7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.1.2.tgz#3c5145436434795fa834150d0b6b6dc577aa6964" - integrity sha512-WfWkJ8k41jZIhXgBtC2T1SpTSKYig99g9MVqrVRco4kduv/6GUWq1eMjk84qZfbU4rwdwc8qct+/gB6DTS17+w== +"@formatjs/intl-listformat@7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.1.3.tgz#e2bda750a46d2a90d7fa023b02a984588978829c" + integrity sha512-rs0Kxl78PeRCedx2cmFoBqcun2Kf0bCQrF8ycna54sfePpDhMskvODWeI4G/xBioW01FjK7CJSvtJJ87hrr79A== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" -"@formatjs/intl-locale@^3.0.6": - version "3.0.6" - resolved "https://registry.yarnpkg.com/@formatjs/intl-locale/-/intl-locale-3.0.6.tgz#de20eb26fc3d3989e6160296891ed8c5e02d6592" - integrity sha512-vP3zSl74frX24UuiCXxUBjDmyg3tWaSN4Yep9m74fJF81VkxanQSUtQVQKKv8CzBmrwFPc1c5LF7co801zPp8Q== +"@formatjs/intl-locale@^3.0.7": + version "3.0.7" + resolved "https://registry.yarnpkg.com/@formatjs/intl-locale/-/intl-locale-3.0.7.tgz#e8fa1eddb31d4f9d1e5228eca5f400ba1949b5b9" + integrity sha512-XucpMNDhiS/gkp+OdvGyHOKBgnB7DVnY81ErjUFI/ztLWxskEDfFhQrWJ4VeG+z0+k2kVnm2akAixhJws3hoKA== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-getcanonicallocales" "2.0.4" tslib "2.4.0" @@ -1592,44 +1627,44 @@ dependencies: tslib "2.4.0" -"@formatjs/intl-numberformat@^8.1.3": - version "8.1.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-8.1.3.tgz#7666e2b3df9accdc0835cf7a3241abfda3b1fa72" - integrity sha512-OLa6/k7rzLCPfNnoCYE1nStZAU6dswFYrTNCyWpDt0uP5UOR6bgpYpLg0ZcnJX9MhV2ZEtcc69bvhL6pULxwDw== +"@formatjs/intl-numberformat@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-8.2.0.tgz#7c2262eb66aff1e899bec155da43c6d6ad50356a" + integrity sha512-X9tIhOSrzw8ywBowd0QGyNE6oXHCcp2GKfTxBR3BZ9m99f5omoQTEH89wTdEFM38oQcWgXN4juSpJYbtZUQ2MA== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" -"@formatjs/intl-pluralrules@^5.1.3": - version "5.1.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.1.3.tgz#0d65f733bf88fe4138ce79a75d00645d7712808f" - integrity sha512-jNEDAXhwpxO1IjOY+UNk7l5SLHX6QCIvJHd40q/HXyThLZULbweayam2rMMhoa/et5dW7K574qYwk2JIeiyxPA== +"@formatjs/intl-pluralrules@^5.1.4": + version "5.1.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.1.4.tgz#7b8f0101a47a017d6b747a5a42959ccb604e4bef" + integrity sha512-SD9G54mH5Kp8COUxZbGL44oLG5ZoNc3MYG/09jtPbPLv8GjLXbs9EEvnwGi0OD9PEnj7dkg0FoOLMulFLcoeCA== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" -"@formatjs/intl-relativetimeformat@^11.1.3": - version "11.1.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-11.1.3.tgz#a265154ce66f66d1b37745783282003a8013c46e" - integrity sha512-P4NLw7NEny3Z+y5IUzPHClcSJE+tuiRBMILXGA5KHayOzzIecm5MO44cOH6aDotunXu43W43Sk7IHHFBlYokBA== +"@formatjs/intl-relativetimeformat@^11.1.4": + version "11.1.4" + resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-11.1.4.tgz#e8ececbae337caf4c62946f6080ef9eecfc6f36f" + integrity sha512-vUz2O1OpmKAyLTyQw6BUT0KMrm/2373zPUlF5wlCmy6mT4YIvxUAizaeSLHKpjQgc6qWmzsOiQTJG04Sz2vtYA== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/intl-localematcher" "0.2.31" tslib "2.4.0" -"@formatjs/intl@2.4.2": - version "2.4.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.4.2.tgz#a2ae882cfd840391f6c319d241d449437511c285" - integrity sha512-RuZT+fecObhWA4CuoDolftfbEYn1yaqTG4yiTSX7W6vnvAupZOqyZXctzebtQ9pDhm6uHHNQSLQ0NL3Y8pCi9g== +"@formatjs/intl@2.5.1": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.5.1.tgz#7a743c3f5ca70b7c7881d6e67e5ce14e2fffac2a" + integrity sha512-P01ZGuDDlcN8bHHBCEHspJPvs8WJeO8SXlUIcVGWhS3IN5vUgz0QKUXcKBFnJbEHhONJ+azlObVwvlDKsE+kUg== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/fast-memoize" "1.2.6" - "@formatjs/icu-messageformat-parser" "2.1.8" - "@formatjs/intl-displaynames" "6.1.3" - "@formatjs/intl-listformat" "7.1.2" - intl-messageformat "10.1.5" + "@formatjs/icu-messageformat-parser" "2.1.10" + "@formatjs/intl-displaynames" "6.1.4" + "@formatjs/intl-listformat" "7.1.3" + intl-messageformat "10.2.1" tslib "2.4.0" "@gar/promisify@^1.0.1": @@ -1971,10 +2006,10 @@ prompts "^2.4.0" semver "^6.3.0" -"@react-native-community/netinfo@^9.3.4": - version "9.3.4" - resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-9.3.4.tgz#712d567703e05c4a01d82a18bd646a93c6757007" - integrity sha512-IXbJ+L8p4oE2ssDPfXCyxx9xVo5WuTMv6HA5YJw2McuRLLtVKR/vambycrB47AWTkHCTj3e0VOz28iUOvTSVPw== +"@react-native-community/netinfo@^9.3.6": + version "9.3.6" + resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-9.3.6.tgz#730de4ebf83f7263fa61b0cbec6cde9b28660077" + integrity sha512-SwbBnHZuXcCUpYdL6ebt4HPAZEugPASl+RPxIyNe91Y+boZptzAFLywYW6yU93DYAhiHHFQBL6x6LxwF/K/tOQ== "@react-native-community/segmented-control@^2.2.2": version "2.2.2" @@ -2047,10 +2082,10 @@ dependencies: nanoid "^3.1.23" -"@react-navigation/stack@^6.3.2": - version "6.3.2" - resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.3.2.tgz#ba0a65e10e2b165185f20718046f25d8c9abb076" - integrity sha512-wb8koMp4OTrG5geOqEFPDatTyl8dsSyRBHN4h0wzgNT29V/JjkS3LYwkGLLfUmMfeLXFyIfEPILAjYLFmnk3dA== +"@react-navigation/stack@^6.3.3": + version "6.3.3" + resolved "https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.3.3.tgz#2a8447038eddd5778bda04605ff3c52c898e6213" + integrity sha512-7CMwLA4NiTnt0qwzZNKwI2ekHEDhTnn3rR6BhD26/De7J1Cogxpxd5pbvEiCG4w95YP/dD054i596howT0Mlmg== dependencies: "@react-navigation/elements" "^1.3.6" color "^4.2.3" @@ -2074,14 +2109,14 @@ component-type "^1.2.1" join-component "^1.1.0" -"@sentry/browser@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.14.2.tgz#668359603e3f32e6debf6a139652f5233b4d3e58" - integrity sha512-KGAZ+5lK7gIO2CM3/MAQGY8JtNVCWXRi807lAxndJ3E1oIQb9A0x7b+AJNr1+6jlwf6QESblr92MCLKPHDpNbA== +"@sentry/browser@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.16.0.tgz#afd2bac91857d2359272a0d9d2b1ee5ca7d69828" + integrity sha512-tJ063zvoF8Raw7mzQEXupOFPSN6v36WIbsDVGeFdToPCwViaBuATaxvWCrudGzsnBkMyItmTLJkzn9SEIXUOiw== dependencies: - "@sentry/core" "7.14.2" - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" "@sentry/cli@1.74.4": @@ -2110,83 +2145,83 @@ proxy-from-env "^1.1.0" which "^2.0.2" -"@sentry/core@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.14.2.tgz#47262aad43d94d8c5fb73b668a7e8e9c4b91c98f" - integrity sha512-AXcH6nROugziO5KsKSQ9TmAXq6HJa8Fn+kDqAL/sNY65w6YYlHifMO2xHkSXVJxGw7vx9DYh/5SF+KnLn6NDNA== +"@sentry/core@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.16.0.tgz#60f9b54ef2ec524176b329e1d15be39c36da5953" + integrity sha512-vq6H1b/IPTvzDD9coQ3wIudvSjkAYuUlXb1dv69dRlq4v3st9dcKBps1Zf0lQ1i4TVlDLoe1iGMmNFglMF1Q5w== dependencies: - "@sentry/hub" "7.14.2" - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/hub@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.14.2.tgz#b7b4d6e5002cd5abe9a829a84db5f4270689c666" - integrity sha512-18cuSesTn9VAF0JC107flLmtCRt/6DBn38uz0G9cPThKtTSNwjGvGZ/ag4J1iq+IDjVS5MA6iTncXOsSpVP2Wg== +"@sentry/hub@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.16.0.tgz#26d65a2f6c71d18ec7a20f352fa8c4c461db2940" + integrity sha512-eCM66JPS2nw+fQK3vpJhs6Lxf4FqOwPqIpFbJ2TivQ8kgJyolHOyeH/LsmJbcw97P4sc3O3LHt5v93vTKmlDrw== dependencies: - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/integrations@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.14.2.tgz#52026f758e4c2a0436c4896bb8b2fa2765982042" - integrity sha512-vxS6ZDgPOxmbfEV6mynu7gouFSnq5LjlnEQYe2D7+/aRPzcgXzwPiqLt/Qd0OG+8LR2UjX+ziBTJOyARZcHxRA== +"@sentry/integrations@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.16.0.tgz#fa6a2a2b7275efec5cf67c07eb76297447301ff2" + integrity sha512-PJRmFUHOKMf1APOlwxGB7Z6LHzJP4xL6OLSoiwnruRuHaGvdyILA53fr/A6wRMSPyTxJDJpNkcN36cA56mLxYA== dependencies: - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" localforage "^1.8.1" tslib "^1.9.3" -"@sentry/react-native@^4.6.1": - version "4.6.1" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-4.6.1.tgz#7d4842275c565c755212104a01ea48db9a120cff" - integrity sha512-P92DqyfqYURpHmaO2yqgqnmB4TW4id1HXe1JrwBvatSpCsinzVtySkmadxQMkIYKhCSEVSfhjGpz5zEosVRpQw== +"@sentry/react-native@^4.7.1": + version "4.7.1" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-4.7.1.tgz#e1cf140c524b5fe5a70133365a2020cc3ad960cb" + integrity sha512-IyqTJFTvxqjdvUOBhdEV9wijDba8If2Ns8AS9MmBnDySgx7dGHWvdGco0SUnT3gtc3jeus+/xjN3DCNp6VBACg== dependencies: - "@sentry/browser" "7.14.2" + "@sentry/browser" "7.16.0" "@sentry/cli" "1.74.4" - "@sentry/core" "7.14.2" - "@sentry/hub" "7.14.2" - "@sentry/integrations" "7.14.2" - "@sentry/react" "7.14.2" - "@sentry/tracing" "7.14.2" - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/core" "7.16.0" + "@sentry/hub" "7.16.0" + "@sentry/integrations" "7.16.0" + "@sentry/react" "7.16.0" + "@sentry/tracing" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" "@sentry/wizard" "1.2.17" -"@sentry/react@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.14.2.tgz#2c59d09d543246d5228e603bd3af76fb30369b75" - integrity sha512-gWPSxOYcAEG/c7Ubuv0yAGMhOvHwMHQ47fEhYa8Be5e/kzXMzc/lQAaoKLNr73BZGvBvY7ghdC53ATGQXLGxpg== +"@sentry/react@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.16.0.tgz#7b214736804b7516ba66230301bc6f0202060a91" + integrity sha512-tJH5zO4MPopzqZgi7Yd4iIB9Am5uGVefgkHaoeCGXffveEVWqEdjj8TqPL36SBb76gCmtpa01NBDsUSDZ1w/yw== dependencies: - "@sentry/browser" "7.14.2" - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/browser" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" hoist-non-react-statics "^3.3.2" tslib "^1.9.3" -"@sentry/tracing@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.14.2.tgz#77f36618f10202a502dec4454dff43c6ede832d9" - integrity sha512-KCZogsvqUYiR9vNPWXVgSM00CF+yfYJaBd363fN3HUbjya4j96cHJg65zf6oy85Igr6IGclYaTkoEbiZ6xdNDw== +"@sentry/tracing@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.16.0.tgz#823b84abf0df08ecd16669547b4281e3c7a96ac9" + integrity sha512-8a9bViUY7oS35msBMouxkgz5OGd9NGutuKF7SQ8hPZwTcQPOxOwPyHccykgr56k6OmaDjGCLZMqZowaysJj+4g== dependencies: - "@sentry/hub" "7.14.2" - "@sentry/types" "7.14.2" - "@sentry/utils" "7.14.2" + "@sentry/core" "7.16.0" + "@sentry/types" "7.16.0" + "@sentry/utils" "7.16.0" tslib "^1.9.3" -"@sentry/types@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.14.2.tgz#78e2e2632d1ee10092549ba32efbe2bc288cbf6f" - integrity sha512-JzkOtenArOXmJBAk/FBbxKKX7XC650HqkhGL4ugT/f+RyxfiDZ0X1TAYMrvKIe+qpn5Nh7JUBfR+BARKAiu2wQ== +"@sentry/types@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.16.0.tgz#79c06ada153a84feb949fa49b1c9d15f91decd79" + integrity sha512-i6D+OK6d0l/k+VQvRp/Pt21WkDEgVBUIZq+sOkEZJczbcfexVdXKeXXoYTD2vYuFq8Yy28fzlsZaKI+NoH94yQ== -"@sentry/utils@7.14.2": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.14.2.tgz#5af245fc2d72211490cb9aeaf2098e048739120a" - integrity sha512-vpZolN+k1IoxWXhKyOVcRl7V1bgww+96gHqTJdcMzOB83x/ofels7L0kqxb03WukKTYcnc7Ep+yBiKi/OYX9og== +"@sentry/utils@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.16.0.tgz#b832520c661d4435808969ee04814ff8e20497b1" + integrity sha512-3Zh1txg7IRp4kZAdG27YF7K6lD1IZyuAo9KjoPg1Xzqa4DOZyASJuEkbf+rK2a9T4HrtVHHXJUsNbKg8WM3VHg== dependencies: - "@sentry/types" "7.14.2" + "@sentry/types" "7.16.0" tslib "^1.9.3" "@sentry/wizard@1.2.17": @@ -2297,10 +2332,10 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== -"@types/react-dom@^18.0.6": - version "18.0.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.6.tgz#36652900024842b74607a17786b6662dd1e103a1" - integrity sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA== +"@types/react-dom@^18.0.8": + version "18.0.8" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.8.tgz#d2606d855186cd42cc1b11e63a71c39525441685" + integrity sha512-C3GYO0HLaOkk9dDAz3Dl4sbe4AKUGTCfFIZsz3n/82dPNN8Du533HzKatDxeUYWu24wJgMP1xICqkWk1YOLOIw== dependencies: "@types/react" "*" @@ -2328,7 +2363,7 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@16 || 17 || 18", "@types/react@^18.0.21": +"@types/react@*", "@types/react@16 || 17 || 18": version "18.0.21" resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.21.tgz#b8209e9626bb00a34c76f55482697edd2b43cc67" integrity sha512-7QUCOxvFgnD5Jk8ZKlUAhVcRj7GuJRjnjjiY/IUBWKgOlnvDvTMLD4RTF7NPyVmbRhNrbomZiOepg7M/2Kj1mA== @@ -2337,6 +2372,15 @@ "@types/scheduler" "*" csstype "^3.0.2" +"@types/react@^18.0.24": + version "18.0.24" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.24.tgz#2f79ed5b27f08d05107aab45c17919754cc44c20" + integrity sha512-wRJWT6ouziGUy+9uX0aW4YOJxAY0bG6/AOk5AW5QSvZqI7dk6VBIbXvcVgIw/W5Jrl24f77df98GEKTJGOLx7Q== + dependencies: + "@types/prop-types" "*" + "@types/scheduler" "*" + csstype "^3.0.2" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -4003,10 +4047,10 @@ expo-modules-autolinking@0.10.3: find-up "^5.0.0" fs-extra "^9.1.0" -expo-modules-core@0.11.7: - version "0.11.7" - resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-0.11.7.tgz#538f2a4d7c353467fb0313de4788e86dd8f251e3" - integrity sha512-lTH6MYULX99JK3zN4bhjRD3I9Y1CGx0RAhpZ6gCTO8GQ/DNw4xZRUwburKL9dJeZM5G1xJOcGoBkTfeMjUVe+g== +expo-modules-core@0.11.8: + version "0.11.8" + resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-0.11.8.tgz#68de1bc56a148b9a9c03f1268c67e9e264d4d4b9" + integrity sha512-goC2ghZFVaV6nXEbk+kz9oKnQmqW8fHVUCSPxC0QXhV0ay1dA9Ki6qqMPagkBJUPAz89NsNqW3bYR6DFXq7lvA== dependencies: compare-versions "^3.4.0" invariant "^2.2.4" @@ -4069,13 +4113,13 @@ expo-web-browser@^11.0.0, expo-web-browser@~11.0.0: dependencies: compare-urls "^2.0.0" -expo@^46.0.15: - version "46.0.15" - resolved "https://registry.yarnpkg.com/expo/-/expo-46.0.15.tgz#c10d27c0ee85669132310949f2e56e95b4a14469" - integrity sha512-/uZLQgXKni/rLoJPUESte901Z8owZH4weItLGhac2T37zZEUHIqcWdI/1+BaN8Racz9x54PzgbIMh09QMgv9mQ== +expo@^46.0.16: + version "46.0.16" + resolved "https://registry.yarnpkg.com/expo/-/expo-46.0.16.tgz#8fe6d10207dabda34a684efac2c45c3c1c089f11" + integrity sha512-lZETkf3t+gbZjKjSceIpU7I8Rmm5nZ0ZG1WPzNBBbm+k64/+kKV96s6RqS37W1TTDpIbd+AucT9kKpvtv0JB2A== dependencies: "@babel/runtime" "^7.14.0" - "@expo/cli" "0.3.1" + "@expo/cli" "0.3.2" "@expo/vector-icons" "^13.0.0" babel-preset-expo "~9.2.0" cross-spawn "^6.0.5" @@ -4086,7 +4130,7 @@ expo@^46.0.15: expo-font "~10.2.1" expo-keep-awake "~10.2.0" expo-modules-autolinking "0.10.3" - expo-modules-core "0.11.7" + expo-modules-core "0.11.8" fbemitter "^3.0.0" getenv "^1.0.0" invariant "^2.2.4" @@ -4739,10 +4783,10 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -i18next@^21.10.0: - version "21.10.0" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.10.0.tgz#85429af55fdca4858345d0e16b584ec29520197d" - integrity sha512-YeuIBmFsGjUfO3qBmMOc0rQaun4mIpGKET5WDwvu8lU7gvwpcariZLNtL0Fzj+zazcHUrlXHiptcFhBMFaxzfg== +i18next@^22.0.3: + version "22.0.3" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.3.tgz#084e40ec88d63c13385175ddebcc4395c89b97e3" + integrity sha512-gG6kCG5+gnPXdK8TLTJ2oiuFSjn6CYMSUwV3vnmISxwTunJHREn/z6gi1g7942c61K1dL3Gm+9a64nZCPv6mlg== dependencies: "@babel/runtime" "^7.17.2" @@ -4860,14 +4904,14 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -intl-messageformat@10.1.5: - version "10.1.5" - resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.1.5.tgz#ec053e0367ee5e4d40a9448ddbb9fff143266a9d" - integrity sha512-bDQz81oQ6TkQp1pSnlBK36ahGL5/tLb0+3hSiG/1/SnVbz5NWPQTqaPx2cT7nmGujDrPn9pQ0ik8RWE8v1lzEw== +intl-messageformat@10.2.1: + version "10.2.1" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.2.1.tgz#2f5626db773c82f3038d355f56ac4736ceef362b" + integrity sha512-1lrJG2qKzcC1TVzYu1VuB1yiY68LU5rwpbHa2THCzA67Vutkz7+1lv5U20K3Lz5RAiH78zxNztMEtchokMWv8A== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" + "@formatjs/ecma402-abstract" "1.13.0" "@formatjs/fast-memoize" "1.2.6" - "@formatjs/icu-messageformat-parser" "2.1.8" + "@formatjs/icu-messageformat-parser" "2.1.10" tslib "2.4.0" invariant@*, invariant@^2.2.4: @@ -6588,24 +6632,25 @@ password-prompt@^1.0.4: ansi-escapes "^3.1.0" cross-spawn "^6.0.5" -patch-package@^6.4.7: - version "6.4.7" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" - integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== +patch-package@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.5.0.tgz#feb058db56f0005da59cfa316488321de585e88a" + integrity sha512-tC3EqJmo74yKqfsMzELaFwxOAu6FH6t+FzFOsnWAuARm7/n2xB5AOeOueE221eM9gtMuIKMKpF9tBy/X2mNP0Q== dependencies: "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" + chalk "^4.1.2" cross-spawn "^6.0.5" find-yarn-workspace-root "^2.0.0" fs-extra "^7.0.1" is-ci "^2.0.0" klaw-sync "^6.0.0" - minimist "^1.2.0" + minimist "^1.2.6" open "^7.4.2" rimraf "^2.6.3" semver "^5.6.0" slash "^2.0.0" tmp "^0.0.33" + yaml "^1.10.2" path-browserify@^1.0.0: version "1.0.1" @@ -6894,28 +6939,28 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.3.tgz#5e3ca90e682fed1d73a7cb50c2c7402b3e85618d" integrity sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g== -react-i18next@^11.18.6: - version "11.18.6" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.18.6.tgz#e159c2960c718c1314f1e8fcaa282d1c8b167887" - integrity sha512-yHb2F9BiT0lqoQDt8loZ5gWP331GwctHz9tYQ8A2EIEUu+CcEdjBLQWli1USG3RdWQt3W+jqQLg/d4rrQR96LA== +react-i18next@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-12.0.0.tgz#634015a2c035779c5736ae4c2e5c34c1659753b1" + integrity sha512-/O7N6aIEAl1FaWZBNvhdIo9itvF/MO/nRKr9pYqRc9LhuC1u21SlfwpiYQqvaeNSEW3g3qUXLREOWMt+gxrWbg== dependencies: "@babel/runtime" "^7.14.5" html-parse-stringify "^3.0.1" -react-intl@^6.1.2: - version "6.1.2" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.1.2.tgz#31ef6f0f2ed6e51910d4c1e7e27fb43fe7895b57" - integrity sha512-42Kkne7QzXjvljZQ3/ilWz5dHooG2cfgwmZbhtn90gZtUKzmyxRU11Os8nZvCuuLCW1vnecHTjsbBP+7Wpbp6g== +react-intl@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.2.1.tgz#976a44f86a58270d1e498d09636b0ece63ad0344" + integrity sha512-hYxcSamgoA3Mvc55nwhTF1v15T0NUSkaV/EScMNVZXg0kRyaMAoNHkCi9/9H+TnXWNiWrcWH9bjlMlJwrG2V7g== dependencies: - "@formatjs/ecma402-abstract" "1.12.0" - "@formatjs/icu-messageformat-parser" "2.1.8" - "@formatjs/intl" "2.4.2" - "@formatjs/intl-displaynames" "6.1.3" - "@formatjs/intl-listformat" "7.1.2" + "@formatjs/ecma402-abstract" "1.13.0" + "@formatjs/icu-messageformat-parser" "2.1.10" + "@formatjs/intl" "2.5.1" + "@formatjs/intl-displaynames" "6.1.4" + "@formatjs/intl-listformat" "7.1.3" "@types/hoist-non-react-statics" "^3.3.1" "@types/react" "16 || 17 || 18" hoist-non-react-statics "^3.3.2" - intl-messageformat "10.1.5" + intl-messageformat "10.2.1" tslib "2.4.0" "react-is@^16.12.0 || ^17.0.0 || ^18.0.0", react-is@^18.0.0: @@ -6985,10 +7030,10 @@ react-native-flash-message@^0.3.1: prop-types "^15.8.1" react-native-iphone-x-helper "^1.3.1" -react-native-gesture-handler@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.7.1.tgz#c109d33c38cb182fafcda13012b77c6cac43b127" - integrity sha512-Rnak7U4v3ZB+vjVghv5CvAGS+UfRLsXUq7Nq+FycloxZ7jUZjBo+7rPnt+EdTIE2zc2pKhQHIQKcD+IAPg2Scg== +react-native-gesture-handler@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-2.8.0.tgz#ef9857871c10663c95a51546225b6e00cd4740cf" + integrity sha512-poOSfz/w0IyD6Qwq7aaIRRfEaVTl1ecQFoyiIbpOpfNTjm2B1niY2FLrdVQIOtIOe+K9nH55Qal04nr4jGkHdQ== dependencies: "@egjs/hammerjs" "^2.0.17" hoist-non-react-statics "^3.3.0" @@ -7034,10 +7079,10 @@ react-native-reanimated-zoom@^0.3.1: resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.1.tgz#f8f7ab088df920e612dce4cd77a2cd772b50bc17" integrity sha512-/RlmFwfRbRABMWJbZZ51u9wEtDXQ6cR5oM6X9/NAJZhg9KDXzy8Ijt/DYSOsEFMIE2BrZZCY7v/UsM3XdsNdFA== -react-native-reanimated@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.10.0.tgz#ed53be66bbb553b5b5e93e93ef4217c87b8c73db" - integrity sha512-jKm3xz5nX7ABtHzzuuLmawP0pFWP77lXNdIC6AWOceBs23OHUaJ29p4prxr/7Sb588GwTbkPsYkDqVFaE3ezNQ== +react-native-reanimated@^2.12.0: + version "2.12.0" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.12.0.tgz#5821eecfb1769b1617a67a2d4dec12fdeedb2b6e" + integrity sha512-nrlPyw+Hx9u4iJhZk9PoTvDo/QmVAd+bo7OK9Tv3hveNEF9++5oig/g3Uv9V93shy9avTYGsUprUvAEt/xdzeQ== dependencies: "@babel/plugin-transform-object-assign" "^7.16.7" "@babel/preset-typescript" "^7.16.7" @@ -7052,10 +7097,10 @@ react-native-safe-area-context@^4.4.1: resolved "https://registry.yarnpkg.com/react-native-safe-area-context/-/react-native-safe-area-context-4.4.1.tgz#239c60b8a9a80eac70a38a822b04c0f1d15ffc01" integrity sha512-N9XTjiuD73ZpVlejHrUWIFZc+6Z14co1K/p1IFMkImU7+avD69F3y+lhkqA2hN/+vljdZrBSiOwXPkuo43nFQA== -react-native-screens@^3.18.1: - version "3.18.1" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.18.1.tgz#19059f34a29a2ff4247ebb1bf0c2f9beacec1ec4" - integrity sha512-GtEC1AbvpvtKDJldavuONF/hXW1aEZO7qz8SioyHrV9L9/nDiy+iTviMFmeEoix9KwmEHHxoYxc0xiDrFxKHyA== +react-native-screens@^3.18.2: + version "3.18.2" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-3.18.2.tgz#d7ab2d145258d3db9fa630fa5379dc4474117866" + integrity sha512-ANUEuvMUlsYJ1QKukEhzhfrvOUO9BVH9Nzg+6eWxpn3cfD/O83yPBOF8Mx6x5H/2+sMy+VS5x/chWOOo/U7QJw== dependencies: react-freeze "^1.0.0" warn-once "^0.1.0" @@ -8685,6 +8730,11 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== +yaml@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" From e5f750c3c8a57b83b07ea7ebafc56ad85224cfbc Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 27 Oct 2022 22:51:02 +0200 Subject: [PATCH 02/25] Fix Sentry reported crashes --- src/components/ContextMenu/status.ts | 4 +-- src/components/Emojis.tsx | 28 --------------- .../Timeline/Shared/ContextMenu.tsx | 28 ++++++--------- src/screens/Compose/utils/reducer.ts | 2 +- src/screens/ImagesViewer.tsx | 5 ++- src/screens/Tabs/Local.tsx | 2 +- src/screens/Tabs/Me/Profile/Root.tsx | 2 +- src/screens/Tabs/Me/Root/Collections.tsx | 2 +- src/screens/Tabs/Shared/Toot.tsx | 15 ++++---- src/utils/push/useConnect.ts | 2 +- src/utils/slices/instancesSlice.ts | 34 +++++++++---------- 11 files changed, 44 insertions(+), 80 deletions(-) diff --git a/src/components/ContextMenu/status.ts b/src/components/ContextMenu/status.ts index 6974fe2e..5caac672 100644 --- a/src/components/ContextMenu/status.ts +++ b/src/components/ContextMenu/status.ts @@ -89,7 +89,7 @@ const contextMenuStatus = ({ { id: 'status-mute', title: t('status.mute.action', { - context: status.muted.toString() + context: (status.muted || false).toString() }), systemIcon: status.muted ? 'speaker' : 'speaker.slash' } @@ -108,7 +108,7 @@ const contextMenuStatus = ({ accountMenuItems.push({ id: 'status-pin', title: t('status.pin.action', { - context: status.pinned.toString() + context: (status.pinned || false).toString() }), systemIcon: status.pinned ? 'pin.slash' : 'pin' }) diff --git a/src/components/Emojis.tsx b/src/components/Emojis.tsx index 755d2b84..ca744678 100644 --- a/src/components/Emojis.tsx +++ b/src/components/Emojis.tsx @@ -12,33 +12,6 @@ import { Edge, SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-co import { useSelector } from 'react-redux' import EmojisContext, { Emojis, emojisReducer, EmojisState } from './Emojis/helpers/EmojisContext' -const prefetchEmojis = ( - sortedEmojis: { - title: string - data: Pick[][] - }[], - reduceMotionEnabled: boolean -) => { - const prefetches: { uri: string }[] = [] - let requestedIndex = 0 - sortedEmojis.forEach(sorted => { - sorted.data.forEach(emojis => - emojis.forEach(emoji => { - if (requestedIndex > 40) { - return - } - prefetches.push({ - uri: reduceMotionEnabled ? emoji.static_url : emoji.url - }) - requestedIndex++ - }) - ) - }) - try { - FastImage.preload(prefetches) - } catch {} -} - export type Props = { inputProps: EmojisState['inputProps'] customButton?: boolean @@ -82,7 +55,6 @@ const ComponentEmojis: React.FC = ({ }) } emojis.current = sortedEmojis - prefetchEmojis(sortedEmojis, reduceMotionEnabled) } }, [data, reduceMotionEnabled]) diff --git a/src/components/Timeline/Shared/ContextMenu.tsx b/src/components/Timeline/Shared/ContextMenu.tsx index 911ad328..f5935e9d 100644 --- a/src/components/Timeline/Shared/ContextMenu.tsx +++ b/src/components/Timeline/Shared/ContextMenu.tsx @@ -6,10 +6,7 @@ import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import React from 'react' import { createContext } from 'react' import { Platform } from 'react-native' -import ContextMenu, { - ContextMenuAction, - ContextMenuProps -} from 'react-native-context-menu-view' +import ContextMenu, { ContextMenuAction, ContextMenuProps } from 'react-native-context-menu-view' export interface Props { copiableContent: React.MutableRefObject<{ @@ -52,13 +49,15 @@ const TimelineContextMenu: React.FC = ({ queryKey, rootQueryKey }) - const accountOnPress = contextMenuAccount({ - actions, - type: 'status', - queryKey, - rootQueryKey, - id: status.account.id - }) + const accountOnPress = status?.account?.id + ? contextMenuAccount({ + actions, + type: 'status', + queryKey, + rootQueryKey, + id: status.account.id + }) + : null const instanceOnPress = contextMenuInstance({ actions, status, @@ -71,12 +70,7 @@ const TimelineContextMenu: React.FC = ({ { - for (const on of [ - shareOnPress, - statusOnPress, - accountOnPress, - instanceOnPress - ]) { + for (const on of [shareOnPress, statusOnPress, accountOnPress, instanceOnPress]) { on && on(index) } }} diff --git a/src/screens/Compose/utils/reducer.ts b/src/screens/Compose/utils/reducer.ts index 921a9f0d..2440d14b 100644 --- a/src/screens/Compose/utils/reducer.ts +++ b/src/screens/Compose/utils/reducer.ts @@ -88,7 +88,7 @@ const composeReducer = ( attachments: { ...state.attachments, uploads: state.attachments.uploads.map(upload => - upload.remote!.id === action.payload!.id + upload.remote?.id === action.payload?.id ? { ...upload, remote: action.payload } : upload ) diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index afbe4f3a..295c9c22 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -21,8 +21,7 @@ import FlashMessage from 'react-native-flash-message' import { Directions, FlingGestureHandler, - LongPressGestureHandler, - State + LongPressGestureHandler } from 'react-native-gesture-handler' import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom' import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context' @@ -142,7 +141,7 @@ const ScreenImagesViewer = ({ const onViewableItemsChanged = useCallback( ({ viewableItems }: { viewableItems: ViewToken[] }) => { - setCurrentIndex(viewableItems[0].index || 0) + setCurrentIndex(viewableItems[0]?.index || 0) }, [] ) diff --git a/src/screens/Tabs/Local.tsx b/src/screens/Tabs/Local.tsx index 7b30a1c6..d3141e2b 100644 --- a/src/screens/Tabs/Local.tsx +++ b/src/screens/Tabs/Local.tsx @@ -43,7 +43,7 @@ const TabLocal = React.memo( title: t('tabs.local.name'), disabled: queryKey[1].page === 'Following' }, - ...lists.map(list => ({ + ...lists?.map(list => ({ id: list.id, title: list.title, disabled: queryKey[1].page === 'List' && queryKey[1].list === list.id diff --git a/src/screens/Tabs/Me/Profile/Root.tsx b/src/screens/Tabs/Me/Profile/Root.tsx index ae0abbe1..9fc5466a 100644 --- a/src/screens/Tabs/Me/Profile/Root.tsx +++ b/src/screens/Tabs/Me/Profile/Root.tsx @@ -72,7 +72,7 @@ const TabMeProfileRoot: React.FC< } } ) - }, [theme, data?.source.privacy]) + }, [theme, data?.source?.privacy]) const onPressSensitive = useCallback(() => { analytics('me_profile_sensitive', { diff --git a/src/screens/Tabs/Me/Root/Collections.tsx b/src/screens/Tabs/Me/Root/Collections.tsx index 504d5305..daf2608e 100644 --- a/src/screens/Tabs/Me/Root/Collections.tsx +++ b/src/screens/Tabs/Me/Root/Collections.tsx @@ -46,7 +46,7 @@ const Collections: React.FC = () => { updateInstanceMePage({ announcements: { shown: announcementsQuery.data?.length ? true : false, - unread: announcementsQuery.data.filter( + unread: announcementsQuery.data?.filter( announcement => !announcement.read ).length } diff --git a/src/screens/Tabs/Shared/Toot.tsx b/src/screens/Tabs/Shared/Toot.tsx index b238ebad..1c2dca2d 100644 --- a/src/screens/Tabs/Shared/Toot.tsx +++ b/src/screens/Tabs/Shared/Toot.tsx @@ -12,10 +12,7 @@ const TabSharedToot: React.FC> = ({ params: { toot, rootQueryKey } } }) => { - const queryKey: QueryKeyTimeline = [ - 'Timeline', - { page: 'Toot', toot: toot.id } - ] + const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Toot', toot: toot.id }] const flRef = useRef(null) @@ -46,10 +43,12 @@ const TabSharedToot: React.FC> = ({ if (pointer < 1) return try { setTimeout(() => { - flRef.current?.scrollToIndex({ - index: pointer, - viewOffset: 100 - }) + try { + flRef.current?.scrollToIndex({ + index: pointer, + viewOffset: 100 + }) + } catch {} }, 500) } catch (error) { return diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index 3d8ad47f..ab2f7adc 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -8,8 +8,8 @@ import { getExpoToken, retriveExpoToken } from '@utils/slices/appSlice' import { disableAllPushes } from '@utils/slices/instancesSlice' import { useTheme } from '@utils/styles/ThemeManager' import * as Notifications from 'expo-notifications' +import { TFunction } from 'i18next' import { useEffect } from 'react' -import { TFunction } from 'react-i18next' import { AppState } from 'react-native' import { useSelector } from 'react-redux' diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index 845a38b1..48f56887 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -147,11 +147,11 @@ const instancesSlice = createSlice({ .map((e, i) => i === foundEmojiIndex ? { - ...e, - score: calculateScore(e), - count: e.count + 1, - lastUsed: new Date().getTime() - } + ...e, + score: calculateScore(e), + count: e.count + 1, + lastUsed: new Date().getTime() + } : e ) .sort((a, b) => b.score - a.score) @@ -350,17 +350,17 @@ export const getInstanceVersion = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.version export const checkInstanceFeature = (feature: string) => - ({ instances: { instances } }: RootState): Boolean => { - return ( - features - .filter(f => f.feature === feature) - .filter( - f => - parseFloat(instances[findInstanceActive(instances)]?.version) >= - f.version - ).length > 0 - ) - } + ({ 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 */ export const getInstanceConfigurationStatusMaxChars = ({ @@ -434,7 +434,7 @@ export const getInstanceAccount = ({ instances: { instances } }: RootState) => export const getInstanceNotificationsFilter = ({ instances: { instances } -}: RootState) => instances[findInstanceActive(instances)].notifications_filter +}: RootState) => instances[findInstanceActive(instances)]?.notifications_filter export const getInstancePush = ({ instances: { instances } }: RootState) => instances[findInstanceActive(instances)]?.push From 8aaa9bafb74e5a03fc481a1e759b450903795066 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 27 Oct 2022 23:05:00 +0200 Subject: [PATCH 03/25] Fix copy menu item --- src/components/ContextMenu/share.ts | 2 +- src/components/Timeline/Default.tsx | 34 +++++++++-------------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/src/components/ContextMenu/share.ts b/src/components/ContextMenu/share.ts index 58df0bbf..5d7052c6 100644 --- a/src/components/ContextMenu/share.ts +++ b/src/components/ContextMenu/share.ts @@ -25,7 +25,7 @@ const contextMenuShare = ({ copiableContent, actions, type, url }: Props) => { title: t(`share.${type}.action`), systemIcon: 'square.and.arrow.up' }) - Platform.OS !== 'android' && + Platform.OS !== 'android' && type === 'status' && actions.push({ id: 'copy', title: t(`copy.action`), diff --git a/src/components/Timeline/Default.tsx b/src/components/Timeline/Default.tsx index ed3a344f..f7755a63 100644 --- a/src/components/Timeline/Default.tsx +++ b/src/components/Timeline/Default.tsx @@ -16,7 +16,7 @@ import { getInstanceAccount } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import { uniqBy } from 'lodash' -import React, { useCallback, useEffect, useRef } from 'react' +import React, { useCallback, useRef } from 'react' import { Pressable, View } from 'react-native' import { useSelector } from 'react-redux' import TimelineContextMenu from './Shared/ContextMenu' @@ -47,8 +47,7 @@ const TimelineDefault: React.FC = ({ }) => { const { colors } = useTheme() const instanceAccount = useSelector(getInstanceAccount, () => true) - const navigation = - useNavigation>() + const navigation = useNavigation>() const actualStatus = item.reblog ? item.reblog : item @@ -60,9 +59,9 @@ const TimelineDefault: React.FC = ({ }) if ( - !highlighted && queryKey && - shouldFilter({ copiableContent, status: actualStatus, queryKey }) + shouldFilter({ copiableContent, status: actualStatus, queryKey }) && + !highlighted ) { return } @@ -92,9 +91,7 @@ const TimelineDefault: React.FC = ({ padding: StyleConstants.Spacing.Global.PagePadding, backgroundColor: colors.backgroundDefault, paddingBottom: - disableDetails && disableOnPress - ? StyleConstants.Spacing.Global.PagePadding - : 0 + disableDetails && disableOnPress ? StyleConstants.Spacing.Global.PagePadding : 0 }} onPress={onPress} onLongPress={() => {}} @@ -121,13 +118,10 @@ const TimelineDefault: React.FC = ({ - {typeof actualStatus.content === 'string' && - actualStatus.content.length > 0 ? ( + {typeof actualStatus.content === 'string' && actualStatus.content.length > 0 ? ( = ({ actualStatus.media_attachments.length ? ( ) : null} - {!disableDetails && actualStatus.card ? ( - - ) : null} + {!disableDetails && actualStatus.card ? : null} {!disableDetails ? ( - + ) : null} @@ -170,10 +159,7 @@ const TimelineDefault: React.FC = ({ status={actualStatus} ownAccount={ownAccount} accts={uniqBy( - ( - [actualStatus.account] as Mastodon.Account[] & - Mastodon.Mention[] - ) + ([actualStatus.account] as Mastodon.Account[] & Mastodon.Mention[]) .concat(actualStatus.mentions) .filter(d => d?.id !== instanceAccount?.id), d => d?.id From 4b39525c821767dfd94f04362802b6f56226c798 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 27 Oct 2022 23:25:09 +0200 Subject: [PATCH 04/25] Try to fix #413 --- src/utils/push/useConnect.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index ab2f7adc..c8da7fbc 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -33,6 +33,7 @@ const pushUseConnect = ({ t, instances }: Params) => { url: `push/connect/${expoToken}`, sentry: true }).catch(error => { + Notifications.setBadgeCountAsync(0) if (error?.status == 404) { displayMessage({ theme, From ea89bfcc9da8f89d7badfa56f1771b9bc21aa78b Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 27 Oct 2022 23:33:38 +0200 Subject: [PATCH 05/25] New translations timeline.json (Japanese) (#412) --- src/i18n/ja/components/timeline.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i18n/ja/components/timeline.json b/src/i18n/ja/components/timeline.json index 35bb6170..37ccf4c3 100644 --- a/src/i18n/ja/components/timeline.json +++ b/src/i18n/ja/components/timeline.json @@ -21,14 +21,14 @@ "shared": { "actioned": { "pinned": "固定された投稿", - "favourite": "{name}さんがあなたのトゥートをお気に入りに登録しました", - "status": "{name}さんが投稿しました", - "follow": "{name}さんにフォローされました", + "favourite": "{{name}}さんがあなたのトゥートをお気に入りに登録しました", + "status": "{{name}}さんが投稿しました", + "follow": "{{name}}さんにフォローされました", "follow_request": "{{name}}さんがフォローをリクエストしました", "poll": "アンケートが終了しました", "reblog": { - "default": "{name}さんがブースト", - "notification": "{name}さんがあなたのトゥートをブーストしました" + "default": "{{name}}さんがブースト", + "notification": "{{name}}さんがあなたのトゥートをブーストしました" }, "update": "ブーストしたトゥートが編集されました" }, From 73e4497a38d412700ac23ea532d9bed0cffabd38 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 14:13:12 +0100 Subject: [PATCH 06/25] New Crowdin updates (#419) * New translations common.json (Chinese Traditional) * New translations screens.json (Chinese Traditional) * New translations tabs.json (Chinese Traditional) * New translations screens.json (Chinese Traditional) * New translations instance.json (Chinese Traditional) * New translations parse.json (Chinese Traditional) * New translations timeline.json (Chinese Traditional) * New translations mediaSelector.json (Chinese Traditional) * New translations contextMenu.json (Chinese Simplified) * New translations contextMenu.json (Chinese Traditional) * New translations actions.json (Chinese Traditional) * New translations imageViewer.json (Chinese Traditional) * New translations announcements.json (Chinese Traditional) * New translations compose.json (Chinese Traditional) * New translations tabs.json (Chinese Traditional) * New translations accountSelection.json (Chinese Traditional) --- src/i18n/zh-Hans/components/contextMenu.json | 4 +- src/i18n/zh-Hant/common.json | 2 +- src/i18n/zh-Hant/components/contextMenu.json | 60 ++--- src/i18n/zh-Hant/components/instance.json | 4 +- .../zh-Hant/components/mediaSelector.json | 10 +- src/i18n/zh-Hant/components/parse.json | 6 +- src/i18n/zh-Hant/components/timeline.json | 66 ++--- src/i18n/zh-Hant/screens.json | 10 +- .../zh-Hant/screens/accountSelection.json | 4 +- src/i18n/zh-Hant/screens/actions.json | 20 +- src/i18n/zh-Hant/screens/announcements.json | 8 +- src/i18n/zh-Hant/screens/compose.json | 154 +++++------ src/i18n/zh-Hant/screens/imageViewer.json | 14 +- src/i18n/zh-Hant/screens/tabs.json | 252 +++++++++--------- 14 files changed, 307 insertions(+), 307 deletions(-) diff --git a/src/i18n/zh-Hans/components/contextMenu.json b/src/i18n/zh-Hans/components/contextMenu.json index a17add00..1be976e7 100644 --- a/src/i18n/zh-Hans/components/contextMenu.json +++ b/src/i18n/zh-Hans/components/contextMenu.json @@ -48,7 +48,7 @@ "action": "删除嘟文", "alert": { "title": "确认删除?", - "message": "所以转发及收藏将被清除,包括所有回复。", + "message": "所有转发及收藏将被清除,包括所有回复。", "buttons": { "confirm": "确认" } @@ -58,7 +58,7 @@ "action": "删除嘟文并重新发布", "alert": { "title": "确认删除并重新发布?", - "message": "所以转发及收藏将被清除,包括所有回复。", + "message": "所有转发及收藏将被清除,包括所有回复。", "buttons": { "confirm": "确认" } diff --git a/src/i18n/zh-Hant/common.json b/src/i18n/zh-Hant/common.json index 875ac770..2f4cb560 100644 --- a/src/i18n/zh-Hant/common.json +++ b/src/i18n/zh-Hant/common.json @@ -9,7 +9,7 @@ }, "message": { "success": { - "message": "{{function}} 成功完成" + "message": "{{function}} 成功" }, "warning": { "message": "" diff --git a/src/i18n/zh-Hant/components/contextMenu.json b/src/i18n/zh-Hant/components/contextMenu.json index ba398d8a..e375eca0 100644 --- a/src/i18n/zh-Hant/components/contextMenu.json +++ b/src/i18n/zh-Hant/components/contextMenu.json @@ -1,76 +1,76 @@ { - "accessibilityHint": "", + "accessibilityHint": "更多關於此條嘟文,例如發佈者等", "account": { - "title": "", + "title": "使用者操作", "mute": { - "action_false": "", - "action_true": "" + "action_false": "靜音使用者", + "action_true": "解除靜音使用者" }, "block": { - "action_false": "", - "action_true": "" + "action_false": "封鎖使用者", + "action_true": "解除封鎖使用者" }, "reports": { - "action": "" + "action": "檢舉並封鎖" } }, "copy": { - "action": "", - "succeed": "" + "action": "複製嘟文", + "succeed": "已複製" }, "instance": { - "title": "", + "title": "站點操作", "block": { - "action": "", + "action": "封鎖站點 {{instance}}", "alert": { - "title": "", - "message": "", + "title": "確認封鎖站點 {{instance}}?", + "message": "多數情況下,靜音或封鎖特定使用者即可。\n\n封鎖之後,來自此站點的所有內容將被移除。", "buttons": { - "confirm": "" + "confirm": "確認" } } } }, "share": { "status": { - "action": "" + "action": "分享嘟文" }, "account": { - "action": "" + "action": "分享使用者" } }, "status": { - "title": "", + "title": "嘟文操作", "edit": { - "action": "" + "action": "編輯嘟文" }, "delete": { - "action": "", + "action": "刪除嘟文", "alert": { - "title": "", - "message": "", + "title": "確認刪除?", + "message": "所有轉嘟及最愛將被清除,也包含所有回覆。", "buttons": { - "confirm": "" + "confirm": "確認" } } }, "deleteEdit": { - "action": "", + "action": "刪除嘟文並重新發佈", "alert": { - "title": "", - "message": "", + "title": "確認刪除並重新發佈?", + "message": "所有轉嘟及最愛將被清除,也包含所有回覆。", "buttons": { - "confirm": "" + "confirm": "確認" } } }, "mute": { - "action_false": "", - "action_true": "" + "action_false": "靜音嘟文及回覆", + "action_true": "解除靜音嘟文及回覆" }, "pin": { - "action_false": "", - "action_true": "" + "action_false": "釘選嘟文", + "action_true": "取消釘選嘟文" } } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/components/instance.json b/src/i18n/zh-Hant/components/instance.json index 0df8632d..55797647 100644 --- a/src/i18n/zh-Hant/components/instance.json +++ b/src/i18n/zh-Hant/components/instance.json @@ -11,10 +11,10 @@ "domains": "串聯宇宙" }, "disclaimer": { - "base": "" + "base": "將使用系統內建的瀏覽器來登入,tooot 無法讀取您的帳號資訊。" }, "terms": { - "base": "" + "base": "登入則表示您同意<0>隱私條款和<1>服務條款。" } }, "update": { diff --git a/src/i18n/zh-Hant/components/mediaSelector.json b/src/i18n/zh-Hant/components/mediaSelector.json index ba000d9d..1841ceec 100644 --- a/src/i18n/zh-Hant/components/mediaSelector.json +++ b/src/i18n/zh-Hant/components/mediaSelector.json @@ -1,10 +1,10 @@ { "title": "選擇媒體來源", - "message": "", + "message": "媒體 EXIF 資料不會被上傳", "options": { - "image": "", - "image_max": "", - "video": "", - "video_max": "" + "image": "上傳圖片", + "image_max": "上傳圖片(最大 {{max}})", + "video": "上傳影片", + "video_max": "上傳影片(最大 {{max}})" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/components/parse.json b/src/i18n/zh-Hant/components/parse.json index fc364f0e..4c9bbf41 100644 --- a/src/i18n/zh-Hant/components/parse.json +++ b/src/i18n/zh-Hant/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { - "accessibilityHint": "", + "accessibilityHint": "點擊展開或折疊內容", "expanded": "{{hint}}{{totalLines}}", - "totalLines": "", - "defaultHint": "" + "totalLines": " ({{count}} 行)", + "defaultHint": "長嘟文" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/components/timeline.json b/src/i18n/zh-Hant/components/timeline.json index 5623526d..06dded96 100644 --- a/src/i18n/zh-Hant/components/timeline.json +++ b/src/i18n/zh-Hant/components/timeline.json @@ -15,7 +15,7 @@ "message": "上次閱讀於" }, "refresh": { - "fetchPreviousPage": "", + "fetchPreviousPage": "較新的嘟文", "refetch": "到最新的位置" }, "shared": { @@ -30,7 +30,7 @@ "default": "{{name}} 轉嘟了", "notification": "{{name}} 轉嘟了您的嘟文" }, - "update": "" + "update": "轉嘟已編輯" }, "actions": { "reply": { @@ -64,82 +64,82 @@ "accessibilityLabel": "嘟文被編輯了 {{count}} 次", "accessibilityHint": "點擊查看編輯紀錄", "text_one": "{{count}} 次編輯", - "text_other": "" + "text_other": "{{count}} 次編輯" } }, "attachment": { "sensitive": { - "button": "" + "button": "顯示敏感內容" }, "unsupported": { - "text": "", - "button": "" + "text": "載入錯誤", + "button": "嘗試遠端連接" } }, "avatar": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "{{name}} 的大頭貼", + "accessibilityHint": "點擊進入 {{name}} 的頁面" }, "content": { - "expandHint": "" + "expandHint": "隱藏內容" }, - "filtered": "", - "fullConversation": "", + "filtered": "已過濾", + "fullConversation": "閱讀全部對話", "translate": { - "default": "", - "succeed": "", - "failed": "", - "source_not_supported": "", - "target_not_supported": "" + "default": "翻譯", + "succeed": "由 {{provider}} 翻譯自 {{source}}", + "failed": "翻譯失敗", + "source_not_supported": "不支援嘟文的語言", + "target_not_supported": "不支援目標翻譯語言" }, "header": { "shared": { "account": { "name": { - "accessibilityHint": "" + "accessibilityHint": "使用者顯示名稱" }, "account": { - "accessibilityHint": "" + "accessibilityHint": "使用者帳戶" } }, - "application": "", + "application": "{{application}}", "edited": { - "accessibilityLabel": "" + "accessibilityLabel": "嘟文已編輯" }, "muted": { - "accessibilityLabel": "" + "accessibilityLabel": "已靜音此嘟文" }, "visibility": { "direct": { - "accessibilityLabel": "" + "accessibilityLabel": "此嘟文是私訊" }, "private": { - "accessibilityLabel": "" + "accessibilityLabel": "此嘟文僅跟隨者可見" } } }, "conversation": { - "withAccounts": "", + "withAccounts": "@", "delete": { - "function": "" + "function": "刪除私訊" } } }, "poll": { "meta": { "button": { - "vote": "", - "refresh": "" + "vote": "投票", + "refresh": "重新整理" }, "count": { - "voters_one": "", - "voters_other": "", - "votes_one": "", - "votes_other": "" + "voters_one": "{{count}} 人投票", + "voters_other": "{{count}} 人投票", + "votes_one": "{{count}} 票", + "votes_other": "{{count}} 票" }, "expiration": { - "expired": "", - "until": "" + "expired": "投票已結束", + "until": "<0 />截止" } } } diff --git a/src/i18n/zh-Hant/screens.json b/src/i18n/zh-Hant/screens.json index c8645c3e..7730656a 100644 --- a/src/i18n/zh-Hant/screens.json +++ b/src/i18n/zh-Hant/screens.json @@ -1,18 +1,18 @@ { "screenshot": { - "title": "保護隱私", + "title": "隱私權保護", "message": "請不要散佈使用者的身份,像是使用者名稱、大頭照等,謝謝你!", "button": "確認" }, "localCorrupt": { - "message": "登入狀態已過期,請再登入一次" + "message": "登入狀態已過期,請重新登入" }, "pushError": { "message": "推播服務錯誤", - "description": "請在設定裡重新啟用推播" + "description": "請在設定中重新啟用推播" }, "shareError": { - "imageNotSupported": "", - "videoNotSupported": "" + "imageNotSupported": "不支援 {{type}} 類型的圖片", + "videoNotSupported": "不支援 {{type}} 類型的影片" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/accountSelection.json b/src/i18n/zh-Hant/screens/accountSelection.json index b16795a6..229d519c 100644 --- a/src/i18n/zh-Hant/screens/accountSelection.json +++ b/src/i18n/zh-Hant/screens/accountSelection.json @@ -1,6 +1,6 @@ { - "heading": "", + "heading": "分享到...", "content": { - "select_account": "" + "select_account": "選擇帳號" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/actions.json b/src/i18n/zh-Hant/screens/actions.json index 55e9959c..d5187c30 100644 --- a/src/i18n/zh-Hant/screens/actions.json +++ b/src/i18n/zh-Hant/screens/actions.json @@ -1,19 +1,19 @@ { "content": { "altText": { - "heading": "" + "heading": "替代文字" }, "notificationsFilter": { - "heading": "", + "heading": "顯示通知類型", "content": { - "follow": "", - "follow_request": "", - "favourite": "", - "reblog": "", - "mention": "", - "poll": "", - "status": "", - "update": "" + "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "跟隨請求", + "favourite": "$t(screenTabs:me.push.favourite.heading)", + "reblog": "$t(screenTabs:me.push.reblog.heading)", + "mention": "$t(screenTabs:me.push.mention.heading)", + "poll": "$t(screenTabs:me.push.poll.heading)", + "status": "訂閱使用者的嘟文", + "update": "轉嘟被編輯" } } } diff --git a/src/i18n/zh-Hant/screens/announcements.json b/src/i18n/zh-Hant/screens/announcements.json index 95737a45..2669c0d0 100644 --- a/src/i18n/zh-Hant/screens/announcements.json +++ b/src/i18n/zh-Hant/screens/announcements.json @@ -1,10 +1,10 @@ { - "heading": "", + "heading": "公告", "content": { - "published": "", + "published": "發佈於 <0 />", "button": { - "read": "", - "unread": "" + "read": "已讀", + "unread": "標記為已讀" } } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/compose.json b/src/i18n/zh-Hant/screens/compose.json index ceb1afd4..3241360d 100644 --- a/src/i18n/zh-Hant/screens/compose.json +++ b/src/i18n/zh-Hant/screens/compose.json @@ -1,35 +1,35 @@ { "heading": { "left": { - "button": "", + "button": "取消", "alert": { - "title": "", + "title": "確認取消編輯?", "buttons": { - "save": "", - "delete": "", - "cancel": "" + "save": "儲存草稿", + "delete": "刪除草稿", + "cancel": "取消" } } }, "right": { "button": { - "default": "", - "conversation": "", - "reply": "", - "deleteEdit": "", - "edit": "", - "share": "" + "default": "發嘟", + "conversation": "發送私訊", + "reply": "發佈回覆", + "deleteEdit": "發嘟", + "edit": "發嘟", + "share": "發嘟" }, "alert": { "default": { - "title": "", - "button": "" + "title": "發嘟失敗", + "button": "再試一次" }, "removeReply": { - "title": "", - "description": "", - "cancel": "", - "confirm": "" + "title": "回覆的嘟文不存在", + "description": "回覆的嘟文可能已被刪除。確認移除回覆嘟文的關聯?", + "cancel": "$t(common:buttons.cancel)", + "confirm": "移除關聯" } } } @@ -37,143 +37,143 @@ "content": { "root": { "header": { - "postingAs": "", + "postingAs": "以 @{{acct}}@{{domain}} 發嘟", "spoilerInput": { - "placeholder": "" + "placeholder": "警告訊息" }, "textInput": { - "placeholder": "", + "placeholder": "正在想些什麼嗎?", "keyboardImage": { "exceedMaximum": { - "title": "", - "OK": "" + "title": "已達附件數量上限", + "OK": "$t(common:buttons.OK)" } } } }, "footer": { "attachments": { - "sensitive": "", + "sensitive": "標記附件為敏感內容", "remove": { - "accessibilityLabel": "" + "accessibilityLabel": "刪除已上傳的附件,序號 {{attachment}}" }, "edit": { - "accessibilityLabel": "" + "accessibilityLabel": "編輯已上傳的附件,序號 {{attachment}}" }, "upload": { - "accessibilityLabel": "" + "accessibilityLabel": "上傳更多附件" } }, "emojis": { - "accessibilityHint": "" + "accessibilityHint": "點擊新增表情符號到嘟文" }, "poll": { "option": { "placeholder": { - "accessibilityLabel": "", - "single": "", - "multiple": "" + "accessibilityLabel": "投票選項 {{index}}", + "single": "單選題", + "multiple": "複選題" } }, "quantity": { "reduce": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "減少至 {{amount}} 選項", + "accessibilityHint": "已達到最低選項數,目前有 {{amount}} 選項" }, "increase": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "增加至 {{amount}} 選項", + "accessibilityHint": "已達到最高選項數,目前有 {{amount}} 選項" } }, "multiple": { - "heading": "", + "heading": "選擇類型", "options": { - "single": "", - "multiple": "", - "cancel": "" + "single": "單選題", + "multiple": "複選題", + "cancel": "$t(common:buttons.cancel)" } }, "expiration": { - "heading": "", + "heading": "結束時間", "options": { - "300": "", - "1800": "", - "3600": "", - "21600": "", - "86400": "", - "259200": "", - "604800": "", - "cancel": "" + "300": "5 分鐘", + "1800": "30 分鐘", + "3600": "1 小時", + "21600": "6 小時", + "86400": "1 天", + "259200": "3 天", + "604800": "7 天", + "cancel": "$t(common:buttons.cancel)" } } } }, "actions": { "attachment": { - "accessibilityLabel": "", - "accessibilityHint": "", + "accessibilityLabel": "上傳附件", + "accessibilityHint": "當有附件時,投票功能將被禁用", "failed": { "alert": { - "title": "", - "button": "" + "title": "上傳失敗", + "button": "再試一次" } } }, "poll": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "新增投票", + "accessibilityHint": "當啟用投票功能時,附件功能將被禁用" }, "visibility": { - "accessibilityLabel": "", - "title": "", + "accessibilityLabel": "此嘟文公開範圍為 {{visibility}}", + "title": "嘟文公開範圍", "options": { - "public": "", - "unlisted": "", - "private": "", - "direct": "", - "cancel": "" + "public": "公開", + "unlisted": "不公開", + "private": "僅限跟隨者", + "direct": "私訊", + "cancel": "$t(common:buttons.cancel)" } }, "spoiler": { - "accessibilityLabel": "" + "accessibilityLabel": "劇透" }, "emoji": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "新增表情符號", + "accessibilityHint": "打開表情選擇面板,水平滑動切換頁面" } }, - "drafts_one": "", - "drafts_other": "" + "drafts_one": "草稿 ({{count}})", + "drafts_other": "草稿 ({{count}})" }, "editAttachment": { "header": { - "title": "", + "title": "編輯附件", "right": { - "accessibilityLabel": "", + "accessibilityLabel": "儲存編輯附件", "failed": { - "title": "", - "button": "" + "title": "編輯失敗", + "button": "再試一次" } } }, "content": { "altText": { - "heading": "", - "placeholder": "" + "heading": "為附件增加文字說明", + "placeholder": "你可以為附件增加文字說明,以便更多人可以查看他們(包括視力障礙或視力受損人士)。\n\n優質的描述應該簡潔明瞭,但要準確地描述照片中的內容,以便使用者理解其含義。" }, - "imageFocus": "" + "imageFocus": "在預覽圖上拖動圓圈,以選擇縮略圖的焦點" } }, "draftsList": { "header": { - "title": "" + "title": "草稿" }, - "warning": "", + "warning": "草稿只儲存在你的設備上,在部分情況下可能丟失。建議不要長期儲存草稿。", "content": { - "accessibilityHint": "", - "textEmpty": "" + "accessibilityHint": "已儲存的草稿,點擊編輯此草稿", + "textEmpty": "沒有內容" }, - "checkAttachment": "" + "checkAttachment": "正在檢查伺服器上的附件..." } } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/imageViewer.json b/src/i18n/zh-Hant/screens/imageViewer.json index ad2b495c..1d3de721 100644 --- a/src/i18n/zh-Hant/screens/imageViewer.json +++ b/src/i18n/zh-Hant/screens/imageViewer.json @@ -1,17 +1,17 @@ { "content": { "actions": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "更多此圖片的操作", + "accessibilityHint": "您可以儲存或分享此圖片" }, "options": { - "save": "", - "share": "", - "cancel": "" + "save": "儲存圖片", + "share": "分享圖片", + "cancel": "$t(common:buttons.cancel)" }, "save": { - "succeed": "", - "failed": "" + "succeed": "圖片已儲存", + "failed": "儲存圖片失敗" } } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/tabs.json b/src/i18n/zh-Hant/screens/tabs.json index 0ba7ce83..5da0f1b2 100644 --- a/src/i18n/zh-Hant/screens/tabs.json +++ b/src/i18n/zh-Hant/screens/tabs.json @@ -25,8 +25,8 @@ }, "notifications": { "filter": { - "accessibilityLabel": "篩選器", - "accessibilityHint": "" + "accessibilityLabel": "過濾器", + "accessibilityHint": "過濾顯示的通知類型" } }, "me": { @@ -44,7 +44,7 @@ "name": "嘟文字體大小" }, "language": { - "name": "" + "name": "語言" }, "lists": { "name": "清單" @@ -78,276 +78,276 @@ } }, "fontSize": { - "demo": "", + "demo": "

這是一條測試用的嘟文😊。以下是可供選擇的字體大小,從小至超大。

這個設定僅會調整嘟文的本身字體大小,不影響其它字體大小。

", "sizes": { - "S": "", - "M": "", - "L": "", - "XL": "", - "XXL": "" + "S": "小", + "M": "M - 預設", + "L": "大", + "XL": "超大", + "XXL": "特大" } }, "profile": { "cancellation": { - "title": "", - "message": "", + "title": "變更尚未儲存", + "message": "您的變更尚未儲存。是否放棄儲存變更?", "buttons": { - "cancel": "", - "discard": "" + "cancel": "$t(common:buttons.cancel)", + "discard": "不儲存" } }, "feedback": { - "succeed": "", - "failed": "" + "succeed": "{{type}} 已更新", + "failed": "{{type}} 更新失敗,請重試。" }, "root": { "name": { - "title": "" + "title": "顯示名稱" }, "avatar": { - "title": "", - "description": "" + "title": "大頭貼", + "description": "會按比例縮小成 400x400 像素" }, "header": { - "title": "", - "description": "" + "title": "頁面頂端", + "description": "會按比例縮小成 1500x500 像素" }, "note": { - "title": "" + "title": "簡介" }, "fields": { "title": "描述資料", - "total_one": "", - "total_other": "" + "total_one": "{{count}} 項", + "total_other": "{{count}} 項" }, "visibility": { - "title": "", + "title": "嘟文預設公開範圍", "options": { - "public": "", - "unlisted": "", - "private": "", - "cancel": "" + "public": "公開", + "unlisted": "不公開", + "private": "僅限跟隨者", + "cancel": "$t(common:buttons.cancel)" } }, "sensitive": { - "title": "" + "title": "媒體預設標為敏感" }, "lock": { - "title": "", - "description": "" + "title": "鎖定帳號", + "description": "需要您手動批准跟隨請求" }, "bot": { - "title": "", - "description": "" + "title": "機器人帳號", + "description": "此帳號主要執行自動操作且可能未被監控" } }, "fields": { - "group": "", - "label": "", - "content": "" + "group": "第 {{index}} 組", + "label": "標籤", + "content": "內容" }, - "mediaSelectionFailed": "" + "mediaSelectionFailed": "圖片處理失敗,請重試" }, "push": { - "notAvailable": "", + "notAvailable": "您的手機不支援 tooot 推播通知", "enable": { - "direct": "", - "settings": "" + "direct": "啟用推播通知", + "settings": "在設定中啟用" }, "global": { - "heading": "", - "description": "" + "heading": "啟用 {{acct}}", + "description": "通知訊息將經由 tooot 伺服器轉發" }, "decode": { - "heading": "", - "description": "" + "heading": "顯示通知內容", + "description": "經由 tooot 伺服器轉發的通知訊息已被加密,但可以允許 tooot 伺服器解密並轉發訊息。tooot 訊息伺服器為開放原始碼,且不儲存任何日誌。" }, "default": { - "heading": "" + "heading": "預設" }, "follow": { - "heading": "" + "heading": "新的跟隨者" }, "follow_request": { - "heading": "" + "heading": "跟隨請求" }, "favourite": { - "heading": "" + "heading": "嘟文被喜歡" }, "reblog": { - "heading": "" + "heading": "嘟文被轉嘟" }, "mention": { - "heading": "" + "heading": "嘟文提及您" }, "poll": { - "heading": "" + "heading": "投票更新" }, "status": { - "heading": "" + "heading": "訂閱使用者的嘟文" }, - "howitworks": "" + "howitworks": "了解通知訊息轉發如何工作" }, "root": { "announcements": { "content": { - "unread": "", - "read": "", - "empty": "" + "unread": "{{amount}} 條未讀", + "read": "全部已讀", + "empty": "無" } }, "push": { "content": { - "enabled": "", - "disabled": "" + "enabled": "啟用", + "disabled": "關閉" } }, "update": { - "title": "" + "title": "已更新到最新版本" }, "logout": { - "button": "", + "button": "登出", "alert": { - "title": "", - "message": "", + "title": "確定要登出?", + "message": "登出後,需要重新驗證帳號", "buttons": { - "logout": "", - "cancel": "" + "logout": "登出", + "cancel": "$t(common:buttons.cancel)" } } } }, "settings": { "fontsize": { - "heading": "", + "heading": "$t(me.stacks.fontSize.name)", "content": { - "S": "", - "M": "", - "L": "", - "XL": "", - "XXL": "" + "S": "$t(me.fontSize.sizes.S)", + "M": "$t(me.fontSize.sizes.M)", + "L": "$t(me.fontSize.sizes.L)", + "XL": "$t(me.fontSize.sizes.XL)", + "XXL": "$t(me.fontSize.sizes.XXL)" } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { - "cancel": "" + "cancel": "$t(common:buttons.cancel)" } }, "theme": { - "heading": "", + "heading": "外觀", "options": { - "auto": "", - "light": "", - "dark": "", - "cancel": "" + "auto": "跟隨系統", + "light": "淺色模式", + "dark": "深色模式", + "cancel": "$t(common:buttons.cancel)" } }, "darkTheme": { - "heading": "", + "heading": "深色主題", "options": { - "lighter": "", - "darker": "", - "cancel": "" + "lighter": "暗淡", + "darker": "暗黑", + "cancel": "$t(common:buttons.cancel)" } }, "browser": { - "heading": "", + "heading": "開啟連結", "options": { - "internal": "", - "external": "", - "cancel": "" + "internal": "從應用程式內開啟", + "external": "使用系統瀏覽器開啟", + "cancel": "$t(common:buttons.cancel)" } }, "staticEmoji": { - "heading": "", - "description": "" + "heading": "使用靜態表情", + "description": "如果您在查看表情列表時經常遇到程式無預警退出,您可以嘗試使用靜態表情。" }, "feedback": { - "heading": "" + "heading": "功能建議" }, "support": { - "heading": "" + "heading": "贊助 tooot 開發" }, "review": { - "heading": "" + "heading": "給 tooot 評分" }, "contact": { - "heading": "" + "heading": "聯繫 tooot" }, "analytics": { - "heading": "", - "description": "" + "heading": "幫助我們改善", + "description": "僅收集不與使用者關聯的資料" }, - "version": "", - "instanceVersion": "" + "version": "Version v{{version}}", + "instanceVersion": "Mastodon version v{{version}}" }, "switch": { - "existing": "", - "new": "" + "existing": "選擇已登入的帳號", + "new": "登入新站點" } }, "shared": { "account": { "actions": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "對使用者 {{user}} 的操作", + "accessibilityHint": "您可以靜音、封鎖、檢舉或分享此使用者" }, - "followed_by": "", - "moved": "", - "created_at": "", + "followed_by": " 正在跟隨你", + "moved": "使用者已轉移", + "created_at": "加入於:{{date}}", "summary": { - "statuses_count": "", - "following_count": "", - "followers_count": "" + "statuses_count": "{{count}} 條嘟文", + "following_count": "$t(shared.users.accounts.following)", + "followers_count": "$t(shared.users.accounts.followers)" }, "toots": { - "default": "", - "all": "" + "default": "嘟文", + "all": "嘟文與回覆" } }, "attachments": { - "name": "" + "name": "<0 /><1>的媒體" }, "search": { "header": { - "prefix": "", - "placeholder": "" + "prefix": "搜尋", + "placeholder": "什麼呢" }, "empty": { - "general": "", + "general": "輸入關鍵字搜尋$t(screenTabs:shared.search.sections.accounts)$t(screenTabs:shared.search.sections.hashtags)$t(screenTabs:shared.search.sections.statuses)", "advanced": { - "header": "", + "header": "進階搜尋", "example": { - "account": "", - "hashtag": "", - "statusLink": "", - "accountLink": "" + "account": "$t(shared.search.header.prefix) $t(shared.search.sections.accounts)", + "hashtag": "$t(shared.search.header.prefix) $t(shared.search.sections.hashtags)", + "statusLink": "$t(shared.search.header.prefix) $t(shared.search.sections.statuses)", + "accountLink": "$t(shared.search.header.prefix) $t(shared.search.sections.accounts)" } } }, "sections": { - "accounts": "", - "hashtags": "", - "statuses": "" + "accounts": "使用者", + "hashtags": "主題標籤", + "statuses": "嘟文" }, - "notFound": "" + "notFound": "找不到 {{searchTerm}} 相關的 {{type}}" }, "toot": { - "name": "" + "name": "討論" }, "users": { "accounts": { - "following": "", - "followers": "" + "following": "正在跟隨 {{count}} 人", + "followers": "被 {{count}} 人跟隨" }, "statuses": { - "reblogged_by": "", - "favourited_by": "" + "reblogged_by": "{{count}} 人轉嘟", + "favourited_by": "{{count}} 人喜歡" } }, "history": { - "name": "" + "name": "編輯歷史" } } } \ No newline at end of file From 8bc59d393252f01768ca90d86cb0ab166df50f0f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 14:29:43 +0100 Subject: [PATCH 07/25] Added zh-Hant --- ios/tooot.xcodeproj/project.pbxproj | 3 +++ ios/zh-Hant.lproj/InfoPlist.strings | 2 ++ src/i18n/i18n.ts | 6 +++++- src/i18n/locales.ts | 3 ++- src/i18n/zh-Hant/_all.ts | 18 ++++++++++++++++++ 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 ios/zh-Hant.lproj/InfoPlist.strings create mode 100644 src/i18n/zh-Hant/_all.ts diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 413887e6..5ee42bb0 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -76,6 +76,7 @@ E633A427281EAEAB000E540F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; E633A42F281EAF38000E540F /* ShareViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ShareViewController.swift; path = "../../node_modules/react-native-share-menu/ios/ShareViewController.swift"; sourceTree = ""; }; E633A431281EB55C000E540F /* ShareExtension-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ShareExtension-Bridging-Header.h"; sourceTree = ""; }; + E671BDF8290EAFB800287BD0 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = ""; }; E69EBACA28DF282D0057EDEC /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACB28DF283A0057EDEC /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = ""; }; E69EBACC28DF28420057EDEC /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -289,6 +290,7 @@ "pt-BR", vi, ja, + "zh-Hant", ); mainGroup = 83CBB9F61A601CBA00E9B192; productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; @@ -514,6 +516,7 @@ E69EBACD28DF284D0057EDEC /* pt-BR */, E69EBACE28DF28560057EDEC /* vi */, E6C8B26628F5F9FC0062CF2E /* ja */, + E671BDF8290EAFB800287BD0 /* zh-Hant */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/ios/zh-Hant.lproj/InfoPlist.strings b/ios/zh-Hant.lproj/InfoPlist.strings new file mode 100644 index 00000000..e9af2b76 --- /dev/null +++ b/ios/zh-Hant.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +"NSPhotoLibraryAddUsageDescription" = "允許tooot保存圖片至相冊"; +"NSPhotoLibraryUsageDescription" = "允許tooot保存圖片至相冊"; diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 1991c2c3..c3fde20c 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -9,6 +9,7 @@ import ko from '@root/i18n/ko/_all' import pt_BR from '@root/i18n/pt_BR/_all' import vi from '@root/i18n/vi/_all' import zh_Hans from '@root/i18n/zh-Hans/_all' +import zh_Hant from '@root/i18n/zh-Hant/_all' import '@formatjs/intl-getcanonicallocales/polyfill' import '@formatjs/intl-locale/polyfill' @@ -32,6 +33,7 @@ import '@formatjs/intl-numberformat/locale-data/ko' import '@formatjs/intl-numberformat/locale-data/pt' import '@formatjs/intl-numberformat/locale-data/vi' import '@formatjs/intl-numberformat/locale-data/zh-Hans' +import '@formatjs/intl-numberformat/locale-data/zh-Hant' import '@formatjs/intl-datetimeformat/polyfill' import '@formatjs/intl-datetimeformat/locale-data/de' @@ -42,6 +44,7 @@ import '@formatjs/intl-datetimeformat/locale-data/ko' import '@formatjs/intl-datetimeformat/locale-data/pt' import '@formatjs/intl-datetimeformat/locale-data/vi' import '@formatjs/intl-datetimeformat/locale-data/zh-Hans' +import '@formatjs/intl-datetimeformat/locale-data/zh-Hant' import '@formatjs/intl-datetimeformat/add-all-tz' import '@formatjs/intl-relativetimeformat/polyfill' @@ -53,6 +56,7 @@ import '@formatjs/intl-relativetimeformat/locale-data/ko' import '@formatjs/intl-relativetimeformat/locale-data/pt' import '@formatjs/intl-relativetimeformat/locale-data/vi' import '@formatjs/intl-relativetimeformat/locale-data/zh-Hans' +import '@formatjs/intl-relativetimeformat/locale-data/zh-Hant' i18n.use(initReactI18next).init({ lng: 'en', @@ -61,7 +65,7 @@ i18n.use(initReactI18next).init({ ns: ['common'], defaultNS: 'common', - resources: { de, en, it, ja, ko, 'pt-BR': pt_BR, vi, 'zh-Hans': zh_Hans }, + resources: { de, en, it, ja, ko, 'pt-BR': pt_BR, vi, 'zh-Hans': zh_Hans, 'zh-Hant': zh_Hant }, returnEmptyString: false, saveMissing: true, diff --git a/src/i18n/locales.ts b/src/i18n/locales.ts index af9769b3..fb48f337 100644 --- a/src/i18n/locales.ts +++ b/src/i18n/locales.ts @@ -6,7 +6,8 @@ const LOCALES = { ko: '한국어', 'pt-BR': 'Português (Brasil)', vi: 'Tiếng Việt', - 'zh-Hans': '简体中文' + 'zh-Hans': '简体中文', + 'zh-Hant': '繁體中文' } export { LOCALES } diff --git a/src/i18n/zh-Hant/_all.ts b/src/i18n/zh-Hant/_all.ts new file mode 100644 index 00000000..5f2a7a82 --- /dev/null +++ b/src/i18n/zh-Hant/_all.ts @@ -0,0 +1,18 @@ +export default { + common: require('./common'), + + screens: require('./screens'), + screenActions: require('./screens/actions'), + screenAnnouncements: require('./screens/announcements'), + screenCompose: require('./screens/compose'), + screenImageViewer: require('./screens/imageViewer'), + screenTabs: require('./screens/tabs'), + + componentContextMenu: require('./components/contextMenu'), + componentEmojis: require('./components/emojis'), + componentInstance: require('./components/instance'), + componentMediaSelector: require('./components/mediaSelector'), + componentParse: require('./components/parse'), + componentRelationship: require('./components/relationship'), + componentTimeline: require('./components/timeline') +} From a8cd620cbbbe7f73b582b64429479b6f0c54252e Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 14:34:38 +0100 Subject: [PATCH 08/25] Bump SDWebImage --- ios/Podfile.lock | 12 ++++++------ patches/react-native-fast-image+8.6.1.patch | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 51634f3a..7735cd39 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -534,7 +534,7 @@ PODS: - React-Core - RNFastImage (8.6.1): - React-Core - - SDWebImage (~> 5.13.4) + - SDWebImage (~> 5.13.5) - SDWebImageWebPCoder (~> 0.9.0) - RNGestureHandler (2.8.0): - React-Core @@ -575,9 +575,9 @@ PODS: - React - RNSVG (13.0.0): - React-Core - - SDWebImage (5.13.4): - - SDWebImage/Core (= 5.13.4) - - SDWebImage/Core (5.13.4) + - SDWebImage (5.13.5): + - SDWebImage/Core (= 5.13.5) + - SDWebImage/Core (5.13.5) - SDWebImageWebPCoder (0.9.1): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.13) @@ -928,14 +928,14 @@ SPEC CHECKSUMS: ReactCommon: fe7580b9d10f00249facf25659e0ec051320cc8a RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd - RNFastImage: e6267e27581b81918ebef6432c94c20718ec3b91 + RNFastImage: 386e5658bdcc109e8f1fe3265884cb35f0b73541 RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3 RNReanimated: c3e58924b9418883b0bde9e78c4c957302f02435 RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d RNSentry: 694aecc3d8240e4935374974a6636e360ae06394 RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3 RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff - SDWebImage: e5cc87bf736e60f49592f307bdf9e157189298a3 + SDWebImage: 23d714cd599354ee7906dbae26dff89b421c4370 SDWebImageWebPCoder: 18503de6621dd2c420d680e33d46bf8e1d5169b0 Sentry: 2c6053e4cfe6dea6608135dea1928ffbb4ecfba5 Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b diff --git a/patches/react-native-fast-image+8.6.1.patch b/patches/react-native-fast-image+8.6.1.patch index 145af302..a3c67555 100644 --- a/patches/react-native-fast-image+8.6.1.patch +++ b/patches/react-native-fast-image+8.6.1.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..c68771e 100644 +index db0fada..1aae975 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| @@ -8,7 +8,7 @@ index db0fada..c68771e 100644 s.dependency 'React-Core' - s.dependency 'SDWebImage', '~> 5.11.1' - s.dependency 'SDWebImageWebPCoder', '~> 0.8.4' -+ s.dependency 'SDWebImage', '~> 5.13.4' ++ s.dependency 'SDWebImage', '~> 5.13.5' + s.dependency 'SDWebImageWebPCoder', '~> 0.9.0' end diff --git a/node_modules/react-native-fast-image/android/build.gradle b/node_modules/react-native-fast-image/android/build.gradle From 10e22f9d4ae77ae216075db43be48169e00c3687 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 14:49:37 +0100 Subject: [PATCH 09/25] Fixed #418 --- src/components/Parse/HTML.tsx | 4 ++-- src/i18n/en/components/parse.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Parse/HTML.tsx b/src/components/Parse/HTML.tsx index bd0fd13a..2456ad18 100644 --- a/src/components/Parse/HTML.tsx +++ b/src/components/Parse/HTML.tsx @@ -272,9 +272,9 @@ const ParseHTML = React.memo( }} children={t('HTML.expanded', { hint: expandHint, - totalLines: + moreLines: numberOfLines > 1 && typeof totalLines === 'number' - ? t('HTML.totalLines', { count: totalLines }) + ? t('HTML.moreLines', { count: totalLines - numberOfLines }) : '' })} /> diff --git a/src/i18n/en/components/parse.json b/src/i18n/en/components/parse.json index 2305906a..0583edef 100644 --- a/src/i18n/en/components/parse.json +++ b/src/i18n/en/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "Tap to expand or collapse content", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": " ({{count}} lines)", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": " ({{count}} more lines)", "defaultHint": "Long toot" } } \ No newline at end of file From d203c002799e96e0ffa2e042befaa3d5b9b261af Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 15:05:40 +0100 Subject: [PATCH 10/25] Fixed #417 --- src/Screens.tsx | 6 +----- src/screens/ImageViewer/save.ts | 15 ++------------- src/screens/ImagesViewer.tsx | 11 ++--------- 3 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/Screens.tsx b/src/Screens.tsx index 6eaedabc..82408307 100644 --- a/src/Screens.tsx +++ b/src/Screens.tsx @@ -326,11 +326,7 @@ const Screens: React.FC = ({ localCorrupt }) => { theme: Theme image: RootStackParamList['Screen-ImagesViewer']['imageUrls'][0] } -const saveIos = async ({ messageRef, theme, image }: CommonProps) => { +const saveIos = async ({ theme, image }: CommonProps) => { CameraRoll.save(image.url) .then(() => { haptics('Success') displayMessage({ - ref: messageRef, theme, type: 'success', message: i18next.t('screenImageViewer:content.save.succeed') @@ -32,7 +28,6 @@ const saveIos = async ({ messageRef, theme, image }: CommonProps) => { .then(() => { haptics('Success') displayMessage({ - ref: messageRef, theme, type: 'success', message: i18next.t('screenImageViewer:content.save.succeed') @@ -41,7 +36,6 @@ const saveIos = async ({ messageRef, theme, image }: CommonProps) => { .catch(() => { haptics('Error') displayMessage({ - ref: messageRef, theme, type: 'error', message: i18next.t('screenImageViewer:content.save.failed') @@ -50,7 +44,6 @@ const saveIos = async ({ messageRef, theme, image }: CommonProps) => { } else { haptics('Error') displayMessage({ - ref: messageRef, theme, type: 'error', message: i18next.t('screenImageViewer:content.save.failed') @@ -59,7 +52,7 @@ const saveIos = async ({ messageRef, theme, image }: CommonProps) => { }) } -const saveAndroid = async ({ messageRef, theme, image }: CommonProps) => { +const saveAndroid = async ({ theme, image }: CommonProps) => { const fileUri: string = `${FileSystem.documentDirectory}${image.id}.jpg` const downloadedFile: FileSystem.FileSystemDownloadResult = await FileSystem.downloadAsync(image.url, fileUri) @@ -67,7 +60,6 @@ const saveAndroid = async ({ messageRef, theme, image }: CommonProps) => { if (downloadedFile.status != 200) { haptics('Error') displayMessage({ - ref: messageRef, theme, type: 'error', message: i18next.t('screenImageViewer:content.save.failed') @@ -83,7 +75,6 @@ const saveAndroid = async ({ messageRef, theme, image }: CommonProps) => { if (status !== 'granted') { haptics('Error') displayMessage({ - ref: messageRef, theme, type: 'error', message: i18next.t('screenImageViewer:content.save.failed') @@ -96,7 +87,6 @@ const saveAndroid = async ({ messageRef, theme, image }: CommonProps) => { .then(() => { haptics('Success') displayMessage({ - ref: messageRef, theme, type: 'success', message: i18next.t('screenImageViewer:content.save.succeed') @@ -105,7 +95,6 @@ const saveAndroid = async ({ messageRef, theme, image }: CommonProps) => { .catch(() => { haptics('Error') displayMessage({ - ref: messageRef, theme, type: 'error', message: i18next.t('screenImageViewer:content.save.failed') diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index 295c9c22..3c6a3032 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -1,7 +1,6 @@ import analytics from '@components/analytics' import GracefullyImage from '@components/GracefullyImage' import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header' -import { Message } from '@components/Message' import { useActionSheet } from '@expo/react-native-action-sheet' import { RootStackScreenProps } from '@utils/navigation/navigators' import { useTheme } from '@utils/styles/ThemeManager' @@ -51,7 +50,6 @@ const ScreenImagesViewer = ({ const initialIndex = imageUrls.findIndex(image => image.id === id) const [currentIndex, setCurrentIndex] = useState(initialIndex) - const listRef = useRef(null) const messageRef = useRef(null) const { showActionSheetWithOptions } = useActionSheet() @@ -71,7 +69,7 @@ const ScreenImagesViewer = ({ switch (buttonIndex) { case 0: analytics('imageviewer_more_save_press') - saveImage({ messageRef, theme, image: imageUrls[currentIndex] }) + saveImage({ theme, image: imageUrls[currentIndex] }) break case 1: analytics('imageviewer_more_share_press') @@ -193,11 +191,7 @@ const ScreenImagesViewer = ({ switch (buttonIndex) { case 0: analytics('imageviewer_more_save_press') - saveImage({ - messageRef, - theme, - image: imageUrls[currentIndex] - }) + saveImage({ theme, image: imageUrls[currentIndex] }) break case 1: analytics('imageviewer_more_share_press') @@ -236,7 +230,6 @@ const ScreenImagesViewer = ({ /> - ) } From 24528b3bb594f7070c1e995bf739b96069296970 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 15:29:23 +0100 Subject: [PATCH 11/25] New Crowdin updates (#421) * New translations parse.json (German) * New translations parse.json (Italian) * New translations parse.json (Japanese) * New translations parse.json (Korean) * New translations parse.json (Chinese Simplified) * New translations parse.json (Chinese Traditional) * New translations parse.json (Vietnamese) * New translations parse.json (Portuguese, Brazilian) * New translations parse.json (Chinese Simplified) * New translations parse.json (German) * New translations parse.json (Italian) * New translations parse.json (Japanese) * New translations parse.json (Korean) * New translations parse.json (Chinese Traditional) * New translations parse.json (Vietnamese) * New translations parse.json (Portuguese, Brazilian) --- src/i18n/de/components/parse.json | 4 ++-- src/i18n/it/components/parse.json | 4 ++-- src/i18n/ja/components/parse.json | 4 ++-- src/i18n/ko/components/parse.json | 4 ++-- src/i18n/pt_BR/components/parse.json | 4 ++-- src/i18n/vi/components/parse.json | 4 ++-- src/i18n/zh-Hans/components/parse.json | 4 ++-- src/i18n/zh-Hant/components/parse.json | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/i18n/de/components/parse.json b/src/i18n/de/components/parse.json index fc364f0e..2db10f00 100644 --- a/src/i18n/de/components/parse.json +++ b/src/i18n/de/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": "", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "" } } \ No newline at end of file diff --git a/src/i18n/it/components/parse.json b/src/i18n/it/components/parse.json index fc364f0e..2db10f00 100644 --- a/src/i18n/it/components/parse.json +++ b/src/i18n/it/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": "", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "" } } \ No newline at end of file diff --git a/src/i18n/ja/components/parse.json b/src/i18n/ja/components/parse.json index a87611a8..1db0ec63 100644 --- a/src/i18n/ja/components/parse.json +++ b/src/i18n/ja/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "タップして内容を展開または折りたたむ", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": " ({{count}} 行)", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "長いトゥート" } } \ No newline at end of file diff --git a/src/i18n/ko/components/parse.json b/src/i18n/ko/components/parse.json index fc364f0e..2db10f00 100644 --- a/src/i18n/ko/components/parse.json +++ b/src/i18n/ko/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": "", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "" } } \ No newline at end of file diff --git a/src/i18n/pt_BR/components/parse.json b/src/i18n/pt_BR/components/parse.json index 4b07729b..38f63a43 100644 --- a/src/i18n/pt_BR/components/parse.json +++ b/src/i18n/pt_BR/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "Toque para expandir ou recolher conteúdo", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": "", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "" } } \ No newline at end of file diff --git a/src/i18n/vi/components/parse.json b/src/i18n/vi/components/parse.json index 75f7965e..b27596b7 100644 --- a/src/i18n/vi/components/parse.json +++ b/src/i18n/vi/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "Nhấn để mở rộng hoặc thu gọn nội dung", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": " ({{count}} dòng)", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "", "defaultHint": "Tút dài" } } \ No newline at end of file diff --git a/src/i18n/zh-Hans/components/parse.json b/src/i18n/zh-Hans/components/parse.json index dc86c41a..5a43b7a8 100644 --- a/src/i18n/zh-Hans/components/parse.json +++ b/src/i18n/zh-Hans/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "点击展开或折叠内容", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": " ({{count}} 行)", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "(还有 {{count}} 行)", "defaultHint": "长嘟文" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/components/parse.json b/src/i18n/zh-Hant/components/parse.json index 4c9bbf41..613472f0 100644 --- a/src/i18n/zh-Hant/components/parse.json +++ b/src/i18n/zh-Hant/components/parse.json @@ -1,8 +1,8 @@ { "HTML": { "accessibilityHint": "點擊展開或折疊內容", - "expanded": "{{hint}}{{totalLines}}", - "totalLines": " ({{count}} 行)", + "expanded": "{{hint}}{{moreLines}}", + "moreLines": "(還有 {{count}} 行)", "defaultHint": "長嘟文" } } \ No newline at end of file From 82be585a5b63b76a330cc3cf75fc38d65bb2a2ef Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 17:42:57 +0100 Subject: [PATCH 12/25] Try out live text view --- ios/Podfile.lock | 6 ++++++ package.json | 1 + src/screens/ImagesViewer.tsx | 31 +++++++++++++++++-------------- yarn.lock | 5 +++++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7735cd39..ea39de0e 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -416,6 +416,8 @@ PODS: - React-Core - react-native-language-detection (0.1.0): - React + - react-native-live-text-image-view (0.4.0): + - React-Core - react-native-netinfo (9.3.6): - React-Core - react-native-pager-view (6.0.1): @@ -642,6 +644,7 @@ DEPENDENCIES: - react-native-context-menu-view (from `../node_modules/react-native-context-menu-view`) - react-native-image-picker (from `../node_modules/react-native-image-picker`) - react-native-language-detection (from `../node_modules/react-native-language-detection`) + - react-native-live-text-image-view (from `../node_modules/react-native-live-text-image-view`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-pager-view (from `../node_modules/react-native-pager-view`) - "react-native-paste-input (from `../node_modules/@mattermost/react-native-paste-input`)" @@ -790,6 +793,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-image-picker" react-native-language-detection: :path: "../node_modules/react-native-language-detection" + react-native-live-text-image-view: + :path: "../node_modules/react-native-live-text-image-view" react-native-netinfo: :path: "../node_modules/@react-native-community/netinfo" react-native-pager-view: @@ -909,6 +914,7 @@ SPEC CHECKSUMS: react-native-context-menu-view: b0beca02aad4bd9f9d7d932bf437e0a03baa69ef react-native-image-picker: 4bc9ed38c8be255b515d8c88babbaf74973f91a8 react-native-language-detection: 0e43195ad014974f1b7a31b64820eff34a243f2d + react-native-live-text-image-view: 483bacfdba464162b8cf176bba555364f18b584c react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461 react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca react-native-paste-input: 183ad7dc224e192719616f4258dde5b548627d08 diff --git a/package.json b/package.json index 18b889db..d493e92b 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "react-native-htmlview": "^0.16.0", "react-native-image-picker": "^4.10.0", "react-native-language-detection": "^0.1.0", + "react-native-live-text-image-view": "^0.4.0", "react-native-pager-view": "^6.0.1", "react-native-reanimated": "^2.12.0", "react-native-reanimated-zoom": "^0.3.1", diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index 3c6a3032..5ae832d3 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -22,6 +22,7 @@ import { FlingGestureHandler, LongPressGestureHandler } from 'react-native-gesture-handler' +import { LiveTextImageView } from 'react-native-live-text-image-view' import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom' import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context' import saveImage from './ImageViewer/save' @@ -115,20 +116,22 @@ const ScreenImagesViewer = ({ justifyContent: 'center' }} > - imageRatio - ? (SCREEN_HEIGHT / imageHeight) * imageWidth - : SCREEN_WIDTH, - height: - screenRatio > imageRatio - ? SCREEN_HEIGHT - : (SCREEN_WIDTH / imageWidth) * imageHeight - }} - /> + + imageRatio + ? (SCREEN_HEIGHT / imageHeight) * imageWidth + : SCREEN_WIDTH, + height: + screenRatio > imageRatio + ? SCREEN_HEIGHT + : (SCREEN_WIDTH / imageWidth) * imageHeight + }} + /> +
} /> diff --git a/yarn.lock b/yarn.lock index ffee5507..9afa8895 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7069,6 +7069,11 @@ react-native-language-detection@^0.1.0: resolved "https://registry.yarnpkg.com/react-native-language-detection/-/react-native-language-detection-0.1.0.tgz#06b5d20bffb60dbbd599c8e62b6acf500952afa8" integrity sha512-26CLndVMmMbVp40Y9Herza73nfR08JFTcYkJ3MX5MIQbGRoqgNAG89z8pA1y7dPHHK1Nfa6AWKAYpNv7tMRCaw== +react-native-live-text-image-view@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/react-native-live-text-image-view/-/react-native-live-text-image-view-0.4.0.tgz#d23d5850788609fd1448533213fc6c453c584761" + integrity sha512-PhVFE0YogSLrTlnHIxUWL80CrmbDvxk1JvLx4UHiRHRwLda4dV/e/9Q+Pyh7Vq7qwAPE6vGoN6sjbXNaj4WCew== + react-native-pager-view@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.1.tgz#353abf38d3c2b91ed7c586f10af0f94700f5b1dc" From 30ca45563453555f53127a4f868f007a06c99a23 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 19:17:52 +0100 Subject: [PATCH 13/25] Try to fix building --- .github/workflows/build.yml | 2 +- Gemfile.lock | 53 ++++++++++++++++++------------------- android/build.gradle | 4 +-- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b28323f2..42ee26b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: run: bundle install - name: -- Step 5 -- Run fastlane env: - DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer ENVIRONMENT: ${{ steps.branch.outputs.branch }} SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.branch }} LC_ALL: en_US.UTF-8 diff --git a/Gemfile.lock b/Gemfile.lock index 51c326aa..86ad28c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,20 +17,20 @@ GEM artifactory (3.0.15) atomos (0.1.3) aws-eventstream (1.2.0) - aws-partitions (1.636.0) - aws-sdk-core (3.154.0) + aws-partitions (1.653.0) + aws-sdk-core (3.166.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.525.0) - aws-sigv4 (~> 1.1) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.58.0) - aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-kms (1.59.0) + aws-sdk-core (~> 3, >= 3.165.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.114.0) - aws-sdk-core (~> 3, >= 3.127.0) + aws-sdk-s3 (1.117.1) + aws-sdk-core (~> 3, >= 3.165.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.1) + aws-sigv4 (1.5.2) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.1.0) @@ -86,7 +86,7 @@ GEM escape (0.0.4) ethon (0.15.0) ffi (>= 1.15.0) - excon (0.92.5) + excon (0.93.1) faraday (1.10.2) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) @@ -156,7 +156,7 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-json (1.1.0) - fastlane-plugin-sentry (1.13.1) + fastlane-plugin-sentry (1.14.0) os (~> 1.1, >= 1.1.4) fastlane-plugin-versioning_android (0.1.0) fastlane-plugin-yarn (1.2) @@ -164,9 +164,9 @@ GEM fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.27.0) - google-apis-core (>= 0.7.2, < 2.a) - google-apis-core (0.9.0) + google-apis-androidpublisher_v3 (0.29.0) + google-apis-core (>= 0.9.0, < 2.a) + google-apis-core (0.9.1) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -175,27 +175,27 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-iamcredentials_v1 (0.14.0) - google-apis-core (>= 0.7.2, < 2.a) - google-apis-playcustomapp_v1 (0.10.0) - google-apis-core (>= 0.7, < 2.a) - google-apis-storage_v1 (0.17.0) - google-apis-core (>= 0.7, < 2.a) + google-apis-iamcredentials_v1 (0.15.0) + google-apis-core (>= 0.9.0, < 2.a) + google-apis-playcustomapp_v1 (0.12.0) + google-apis-core (>= 0.9.1, < 2.a) + google-apis-storage_v1 (0.19.0) + google-apis-core (>= 0.9.0, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) google-cloud-errors (1.3.0) - google-cloud-storage (1.42.0) + google-cloud-storage (1.43.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.17.0) + google-apis-storage_v1 (~> 0.19.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.2.0) + googleauth (1.3.0) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -276,11 +276,10 @@ GEM rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) - zeitwerk (2.6.0) + zeitwerk (2.6.1) PLATFORMS - universal-darwin-20 - universal-darwin-21 + arm64-darwin-22 DEPENDENCIES cocoapods @@ -291,4 +290,4 @@ DEPENDENCIES fastlane-plugin-yarn BUNDLED WITH - 2.3.20 + 2.3.24 diff --git a/android/build.gradle b/android/build.gradle index ddb4bc57..68e3f1f2 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -24,7 +24,7 @@ buildscript { repositories { google() mavenCentral() - jcenter() + mavenCentral() } dependencies { classpath 'com.google.gms:google-services:4.3.3' @@ -51,7 +51,7 @@ allprojects { google() mavenCentral() - jcenter() + mavenCentral() maven { url 'https://www.jitpack.io' } } } From 16574c7d6d2fe46534fe2f253b751075b1c7cf30 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 22:25:06 +0100 Subject: [PATCH 14/25] Build --- .github/workflows/build.yml | 2 +- android/build.gradle | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42ee26b5..b28323f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: run: bundle install - name: -- Step 5 -- Run fastlane env: - DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer ENVIRONMENT: ${{ steps.branch.outputs.branch }} SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.branch }} LC_ALL: en_US.UTF-8 diff --git a/android/build.gradle b/android/build.gradle index 68e3f1f2..6d87c600 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -24,7 +24,6 @@ buildscript { repositories { google() mavenCentral() - mavenCentral() } dependencies { classpath 'com.google.gms:google-services:4.3.3' @@ -51,7 +50,6 @@ allprojects { google() mavenCentral() - mavenCentral() maven { url 'https://www.jitpack.io' } } } From badca6276571ba3bb61d848fc6b1e2064596b0e3 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 30 Oct 2022 22:36:36 +0100 Subject: [PATCH 15/25] New Crowdin updates (#422) * New translations mediaSelector.json (Chinese Traditional) * New translations compose.json (Chinese Traditional) --- src/i18n/zh-Hant/components/mediaSelector.json | 4 ++-- src/i18n/zh-Hant/screens/compose.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/zh-Hant/components/mediaSelector.json b/src/i18n/zh-Hant/components/mediaSelector.json index 1841ceec..dc3758fb 100644 --- a/src/i18n/zh-Hant/components/mediaSelector.json +++ b/src/i18n/zh-Hant/components/mediaSelector.json @@ -3,8 +3,8 @@ "message": "媒體 EXIF 資料不會被上傳", "options": { "image": "上傳圖片", - "image_max": "上傳圖片(最大 {{max}})", + "image_max": "上傳圖片(最多 {{max}})", "video": "上傳影片", - "video_max": "上傳影片(最大 {{max}})" + "video_max": "上傳影片(最多 {{max}})" } } \ No newline at end of file diff --git a/src/i18n/zh-Hant/screens/compose.json b/src/i18n/zh-Hant/screens/compose.json index 3241360d..b9a8ebd5 100644 --- a/src/i18n/zh-Hant/screens/compose.json +++ b/src/i18n/zh-Hant/screens/compose.json @@ -39,7 +39,7 @@ "header": { "postingAs": "以 @{{acct}}@{{domain}} 發嘟", "spoilerInput": { - "placeholder": "警告訊息" + "placeholder": "輸入警告訊息" }, "textInput": { "placeholder": "正在想些什麼嗎?", From 8a67fbb29c72d0a66257c1cbf2da12732dd2f242 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 00:22:20 +0100 Subject: [PATCH 16/25] Fix iOS building --- ios/Podfile | 9 +++++++ ios/Podfile.lock | 2 +- ios/tooot.xcodeproj/project.pbxproj | 38 +++++++++++++++++++++++------ ios/tooot/tooot.entitlements | 38 +++++++++++++---------------- 4 files changed, 58 insertions(+), 29 deletions(-) diff --git a/ios/Podfile b/ios/Podfile index 85e73676..2333a640 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -43,6 +43,15 @@ target 'tooot' do config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No' end end + + # For Xcode 14 + installer.generated_projects.each do |project| + project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' + end + end + end end post_integrate do |installer| diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ea39de0e..400fc804 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -947,6 +947,6 @@ SPEC CHECKSUMS: Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d -PODFILE CHECKSUM: 7f078a0355bc9bdbcbbe7257e7e62e1d45f77f75 +PODFILE CHECKSUM: 244b6793e4be83f0909a91b2fe15c8f89a5e8151 COCOAPODS: 1.11.3 diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 5ee42bb0..715f9cee 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -330,6 +330,7 @@ /* Begin PBXShellScriptBuildPhase section */ 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -446,6 +447,7 @@ }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -536,13 +538,17 @@ CURRENT_PROJECT_VERSION = 2102022230; DEVELOPMENT_TEAM = 8EGBLQ2MA6; ENABLE_BITCODE = NO; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "$(inherited)", "FB_SONARKIT_ENABLED=1", ); INFOPLIST_FILE = tooot/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -573,9 +579,13 @@ CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 2102022230; DEVELOPMENT_TEAM = 8EGBLQ2MA6; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; INFOPLIST_FILE = tooot/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -645,7 +655,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = "\"\""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; @@ -698,7 +711,10 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); LIBRARY_SEARCH_PATHS = "\"\""; MTL_ENABLE_DEBUG_INFO = NO; ONLY_ACTIVE_ARCH = NO; @@ -733,7 +749,11 @@ INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 12.4; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -778,7 +798,11 @@ INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 12.4; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE"; diff --git a/ios/tooot/tooot.entitlements b/ios/tooot/tooot.entitlements index 574f838f..9bef1226 100644 --- a/ios/tooot/tooot.entitlements +++ b/ios/tooot/tooot.entitlements @@ -1,24 +1,20 @@ - - aps-environment - development - com.apple.security.app-sandbox - - com.apple.security.application-groups - - group.com.xmflsct.app.tooot - - com.apple.security.device.audio-input - - com.apple.security.device.camera - - com.apple.security.network.client - - com.apple.security.personal-information.location - - com.apple.security.personal-information.photos-library - - - \ No newline at end of file + + aps-environment + development + com.apple.security.app-sandbox + + com.apple.security.application-groups + + group.com.xmflsct.app.tooot + + com.apple.security.device.camera + + com.apple.security.network.client + + com.apple.security.personal-information.photos-library + + + From da1ea314a4d9b22caa2a3d4769793d68ac838f68 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 00:31:31 +0100 Subject: [PATCH 17/25] Swipe down close image https://github.com/intergalacticspacehighway/react-native-reanimated-zoom/issues/15 --- .../react-native-reanimated-zoom+0.3.1.patch | 68 ++++++++++ src/screens/ImagesViewer.tsx | 122 +++++++++--------- 2 files changed, 126 insertions(+), 64 deletions(-) create mode 100644 patches/react-native-reanimated-zoom+0.3.1.patch diff --git a/patches/react-native-reanimated-zoom+0.3.1.patch b/patches/react-native-reanimated-zoom+0.3.1.patch new file mode 100644 index 00000000..1440915f --- /dev/null +++ b/patches/react-native-reanimated-zoom+0.3.1.patch @@ -0,0 +1,68 @@ +diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts +index 9b3e4a3..558944d 100644 +--- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts ++++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts +@@ -4,6 +4,7 @@ declare type Props = { + children: React.ReactNode; + minimumZoomScale?: number; + maximumZoomScale?: number; ++ simultaneousGesture?: GestureType; + } & ViewProps; + export declare function Zoom(props: Props): JSX.Element; + export {}; +diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx +index 2c48163..bc2d3dd 100644 +--- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx ++++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx +@@ -8,13 +8,18 @@ import Animated, { + cancelAnimation, + runOnJS, + } from 'react-native-reanimated'; +-import { Gesture, GestureDetector } from 'react-native-gesture-handler'; ++import { ++ Gesture, ++ GestureDetector, ++ GestureType, ++} from 'react-native-gesture-handler'; + import { ZoomListContext } from './zoom-list-context'; + + type Props = { + children: React.ReactNode; + minimumZoomScale?: number; + maximumZoomScale?: number; ++ simultaneousGesture?: GestureType; + } & ViewProps; + + export function Zoom(props: Props) { +@@ -23,6 +28,7 @@ export function Zoom(props: Props) { + maximumZoomScale = 8, + style: propStyle, + onLayout, ++ simultaneousGesture, + } = props; + + const zoomListContext = useContext(ZoomListContext); +@@ -198,11 +204,21 @@ export function Zoom(props: Props) { + ); + } + +- return Gesture.Race(doubleTap, Gesture.Simultaneous(pan, pinch)); ++ return Gesture.Race( ++ doubleTap, ++ simultaneousGesture ++ ? Gesture.Simultaneous(pan, pinch, simultaneousGesture) ++ : Gesture.Simultaneous(pan, pinch) ++ ); + + // only add prop dependencies + // eslint-disable-next-line react-hooks/exhaustive-deps +- }, [maximumZoomScale, minimumZoomScale, zoomListContext]); ++ }, [ ++ maximumZoomScale, ++ minimumZoomScale, ++ zoomListContext, ++ simultaneousGesture, ++ ]); + + useDerivedValue(() => { + if (scale.value > 1 && !isZoomed.value) { diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index 5ae832d3..d9244a3e 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -17,12 +17,9 @@ import { ViewToken } from 'react-native' import FlashMessage from 'react-native-flash-message' -import { - Directions, - FlingGestureHandler, - LongPressGestureHandler -} from 'react-native-gesture-handler' +import { Directions, Gesture, LongPressGestureHandler } from 'react-native-gesture-handler' import { LiveTextImageView } from 'react-native-live-text-image-view' +import { runOnJS } from 'react-native-reanimated' import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom' import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context' import saveImage from './ImageViewer/save' @@ -106,6 +103,9 @@ const ScreenImagesViewer = ({ return ( 8 ? 8 : max} + simultaneousGesture={Gesture.Fling() + .direction(Directions.DOWN) + .onStart(() => runOnJS(navigation.goBack)())} children={ - navigation.goBack()} - > - { - analytics('imageviewer_more_press') - showActionSheetWithOptions( - { - options: [ - t('content.options.save'), - t('content.options.share'), - t('content.options.cancel') - ], - cancelButtonIndex: 2, - userInterfaceStyle: mode - }, - async buttonIndex => { - switch (buttonIndex) { - case 0: - analytics('imageviewer_more_save_press') - saveImage({ theme, image: imageUrls[currentIndex] }) - break - case 1: - analytics('imageviewer_more_share_press') - switch (Platform.OS) { - case 'ios': - await Share.share({ url: imageUrls[currentIndex].url }) - break - case 'android': - await Share.share({ - message: imageUrls[currentIndex].url - }) - break - } - break - } + { + analytics('imageviewer_more_press') + showActionSheetWithOptions( + { + options: [ + t('content.options.save'), + t('content.options.share'), + t('content.options.cancel') + ], + cancelButtonIndex: 2, + userInterfaceStyle: mode + }, + async buttonIndex => { + switch (buttonIndex) { + case 0: + analytics('imageviewer_more_save_press') + saveImage({ theme, image: imageUrls[currentIndex] }) + break + case 1: + analytics('imageviewer_more_share_press') + switch (Platform.OS) { + case 'ios': + await Share.share({ url: imageUrls[currentIndex].url }) + break + case 'android': + await Share.share({ + message: imageUrls[currentIndex].url + }) + break + } + break } - ) + } + ) + }} + > + item.id} + renderItem={renderItem} + onViewableItemsChanged={onViewableItemsChanged} + viewabilityConfig={{ + itemVisiblePercentThreshold: 50 }} - > - item.id} - renderItem={renderItem} - onViewableItemsChanged={onViewableItemsChanged} - viewabilityConfig={{ - itemVisiblePercentThreshold: 50 - }} - initialScrollIndex={initialIndex} - getItemLayout={(_, index) => ({ - length: SCREEN_WIDTH, - offset: SCREEN_WIDTH * index, - index - })} - /> - - + initialScrollIndex={initialIndex} + getItemLayout={(_, index) => ({ + length: SCREEN_WIDTH, + offset: SCREEN_WIDTH * index, + index + })} + /> + ) } From 7a5735acd7bee64c45257a8b15f8122bcf5df0e3 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 09:04:53 +0100 Subject: [PATCH 18/25] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b28323f2..42ee26b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: run: bundle install - name: -- Step 5 -- Run fastlane env: - DEVELOPER_DIR: /Applications/Xcode_13.4.1.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer ENVIRONMENT: ${{ steps.branch.outputs.branch }} SENTRY_ENVIRONMENT: ${{ steps.branch.outputs.branch }} LC_ALL: en_US.UTF-8 From 9863e13e43b751dfd9c2e6340cb3a0d97b836068 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 19:42:14 +0100 Subject: [PATCH 19/25] Bump up packages --- ios/Podfile.lock | 10 +-- package.json | 8 +-- ...ch => react-native-fast-image+8.6.3.patch} | 4 +- .../react-native-reanimated-zoom+0.3.1.patch | 68 ------------------- yarn.lock | 32 ++++----- 5 files changed, 27 insertions(+), 95 deletions(-) rename patches/{react-native-fast-image+8.6.1.patch => react-native-fast-image+8.6.3.patch} (93%) delete mode 100644 patches/react-native-reanimated-zoom+0.3.1.patch diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 400fc804..2f36a85c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -420,7 +420,7 @@ PODS: - React-Core - react-native-netinfo (9.3.6): - React-Core - - react-native-pager-view (6.0.1): + - react-native-pager-view (6.0.2): - React-Core - react-native-paste-input (0.5.1): - React-Core @@ -534,10 +534,10 @@ PODS: - React-Core - RNCClipboard (1.11.1): - React-Core - - RNFastImage (8.6.1): + - RNFastImage (8.6.3): - React-Core - SDWebImage (~> 5.13.5) - - SDWebImageWebPCoder (~> 0.9.0) + - SDWebImageWebPCoder (~> 0.9.1) - RNGestureHandler (2.8.0): - React-Core - RNReanimated (2.12.0): @@ -916,7 +916,7 @@ SPEC CHECKSUMS: react-native-language-detection: 0e43195ad014974f1b7a31b64820eff34a243f2d react-native-live-text-image-view: 483bacfdba464162b8cf176bba555364f18b584c react-native-netinfo: f80db8cac2151405633324cb645c60af098ee461 - react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca + react-native-pager-view: 592421df0259bf7a7a4fe85b74c24f3f39905605 react-native-paste-input: 183ad7dc224e192719616f4258dde5b548627d08 react-native-safe-area-context: 99b24a0c5acd0d5dcac2b1a7f18c49ea317be99a react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 @@ -934,7 +934,7 @@ SPEC CHECKSUMS: ReactCommon: fe7580b9d10f00249facf25659e0ec051320cc8a RNCAsyncStorage: 0c357f3156fcb16c8589ede67cc036330b6698ca RNCClipboard: 2834e1c4af68697089cdd455ee4a4cdd198fa7dd - RNFastImage: 386e5658bdcc109e8f1fe3265884cb35f0b73541 + RNFastImage: c74e098cb862b4870c3de0b1096b65c63e492938 RNGestureHandler: 62232ba8f562f7dea5ba1b3383494eb5bf97a4d3 RNReanimated: c3e58924b9418883b0bde9e78c4c957302f02435 RNScreens: 34cc502acf1b916c582c60003dc3089fa01dc66d diff --git a/package.json b/package.json index d493e92b..3267ad27 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "expo-store-review": "^5.3.0", "expo-video-thumbnails": "^6.4.0", "expo-web-browser": "^11.0.0", - "i18next": "^22.0.3", + "i18next": "^22.0.4", "li": "^1.3.0", "linkify-it": "^4.0.1", "lodash": "^4.17.21", @@ -72,7 +72,7 @@ "react-native-base64": "^0.2.1", "react-native-blurhash": "^1.1.10", "react-native-context-menu-view": "xmflsct/react-native-context-menu-view", - "react-native-fast-image": "^8.6.1", + "react-native-fast-image": "^8.6.3", "react-native-feather": "^1.1.2", "react-native-flash-message": "^0.3.1", "react-native-gesture-handler": "^2.8.0", @@ -80,9 +80,9 @@ "react-native-image-picker": "^4.10.0", "react-native-language-detection": "^0.1.0", "react-native-live-text-image-view": "^0.4.0", - "react-native-pager-view": "^6.0.1", + "react-native-pager-view": "^6.0.2", "react-native-reanimated": "^2.12.0", - "react-native-reanimated-zoom": "^0.3.1", + "react-native-reanimated-zoom": "^0.3.2", "react-native-safe-area-context": "^4.4.1", "react-native-screens": "^3.18.2", "react-native-share-menu": "^6.0.0", diff --git a/patches/react-native-fast-image+8.6.1.patch b/patches/react-native-fast-image+8.6.3.patch similarity index 93% rename from patches/react-native-fast-image+8.6.1.patch rename to patches/react-native-fast-image+8.6.3.patch index a3c67555..56a28614 100644 --- a/patches/react-native-fast-image+8.6.1.patch +++ b/patches/react-native-fast-image+8.6.3.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..1aae975 100644 +index db0fada..23770b6 100644 --- a/node_modules/react-native-fast-image/RNFastImage.podspec +++ b/node_modules/react-native-fast-image/RNFastImage.podspec @@ -16,6 +16,6 @@ Pod::Spec.new do |s| @@ -9,7 +9,7 @@ index db0fada..1aae975 100644 - s.dependency 'SDWebImage', '~> 5.11.1' - s.dependency 'SDWebImageWebPCoder', '~> 0.8.4' + s.dependency 'SDWebImage', '~> 5.13.5' -+ s.dependency 'SDWebImageWebPCoder', '~> 0.9.0' ++ s.dependency 'SDWebImageWebPCoder', '~> 0.9.1' end diff --git a/node_modules/react-native-fast-image/android/build.gradle b/node_modules/react-native-fast-image/android/build.gradle index 5b21cd5..19d82f8 100644 diff --git a/patches/react-native-reanimated-zoom+0.3.1.patch b/patches/react-native-reanimated-zoom+0.3.1.patch deleted file mode 100644 index 1440915f..00000000 --- a/patches/react-native-reanimated-zoom+0.3.1.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts -index 9b3e4a3..558944d 100644 ---- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts -+++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts -@@ -4,6 +4,7 @@ declare type Props = { - children: React.ReactNode; - minimumZoomScale?: number; - maximumZoomScale?: number; -+ simultaneousGesture?: GestureType; - } & ViewProps; - export declare function Zoom(props: Props): JSX.Element; - export {}; -diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx -index 2c48163..bc2d3dd 100644 ---- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx -+++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx -@@ -8,13 +8,18 @@ import Animated, { - cancelAnimation, - runOnJS, - } from 'react-native-reanimated'; --import { Gesture, GestureDetector } from 'react-native-gesture-handler'; -+import { -+ Gesture, -+ GestureDetector, -+ GestureType, -+} from 'react-native-gesture-handler'; - import { ZoomListContext } from './zoom-list-context'; - - type Props = { - children: React.ReactNode; - minimumZoomScale?: number; - maximumZoomScale?: number; -+ simultaneousGesture?: GestureType; - } & ViewProps; - - export function Zoom(props: Props) { -@@ -23,6 +28,7 @@ export function Zoom(props: Props) { - maximumZoomScale = 8, - style: propStyle, - onLayout, -+ simultaneousGesture, - } = props; - - const zoomListContext = useContext(ZoomListContext); -@@ -198,11 +204,21 @@ export function Zoom(props: Props) { - ); - } - -- return Gesture.Race(doubleTap, Gesture.Simultaneous(pan, pinch)); -+ return Gesture.Race( -+ doubleTap, -+ simultaneousGesture -+ ? Gesture.Simultaneous(pan, pinch, simultaneousGesture) -+ : Gesture.Simultaneous(pan, pinch) -+ ); - - // only add prop dependencies - // eslint-disable-next-line react-hooks/exhaustive-deps -- }, [maximumZoomScale, minimumZoomScale, zoomListContext]); -+ }, [ -+ maximumZoomScale, -+ minimumZoomScale, -+ zoomListContext, -+ simultaneousGesture, -+ ]); - - useDerivedValue(() => { - if (scale.value > 1 && !isZoomed.value) { diff --git a/yarn.lock b/yarn.lock index 9afa8895..0598f6f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4783,10 +4783,10 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -i18next@^22.0.3: - version "22.0.3" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.3.tgz#084e40ec88d63c13385175ddebcc4395c89b97e3" - integrity sha512-gG6kCG5+gnPXdK8TLTJ2oiuFSjn6CYMSUwV3vnmISxwTunJHREn/z6gi1g7942c61K1dL3Gm+9a64nZCPv6mlg== +i18next@^22.0.4: + version "22.0.4" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.0.4.tgz#77d8871687b0ab072b38991e3887187823667e30" + integrity sha512-TOp7BTMKDbUkOHMzDlVsCYWpyaFkKakrrO3HNXfSz4EeJaWwnBScRmgQSTaWHScXVHBUFXTvShrCW8uryBYFcg== dependencies: "@babel/runtime" "^7.17.2" @@ -7012,10 +7012,10 @@ react-native-context-menu-view@xmflsct/react-native-context-menu-view: version "1.5.4" resolved "https://codeload.github.com/xmflsct/react-native-context-menu-view/tar.gz/bff5773d318970cd67b5cf114d4bec1e200178eb" -react-native-fast-image@^8.6.1: - version "8.6.1" - resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.6.1.tgz#6a3a11b8ebc7629919265d33a420a04d13c897e0" - integrity sha512-ILuP7EuakqHNzTr8ZbumhuxG4tE/wGQ66z4nEEuzc0FlqY6rYaPsnq/UD2ahoyFj6QP1WvA2RIK3odib+VcqWg== +react-native-fast-image@^8.6.3: + version "8.6.3" + resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.6.3.tgz#6edc3f9190092a909d636d93eecbcc54a8822255" + integrity sha512-Sdw4ESidXCXOmQ9EcYguNY2swyoWmx53kym2zRsvi+VeFCHEdkO+WG1DK+6W81juot40bbfLNhkc63QnWtesNg== react-native-feather@^1.1.2: version "1.1.2" @@ -7074,15 +7074,15 @@ react-native-live-text-image-view@^0.4.0: resolved "https://registry.yarnpkg.com/react-native-live-text-image-view/-/react-native-live-text-image-view-0.4.0.tgz#d23d5850788609fd1448533213fc6c453c584761" integrity sha512-PhVFE0YogSLrTlnHIxUWL80CrmbDvxk1JvLx4UHiRHRwLda4dV/e/9Q+Pyh7Vq7qwAPE6vGoN6sjbXNaj4WCew== -react-native-pager-view@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.1.tgz#353abf38d3c2b91ed7c586f10af0f94700f5b1dc" - integrity sha512-kOVNu+4JnR3Gpykviy4WbOAnQz8TgP6O2pRvne221oPUDQLYrvEE/FINR0P85TxbMgvKTPlLejGw0ZHQbezK/g== +react-native-pager-view@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.2.tgz#447b85fcb9f35225c4d6885c18689a7d30c181d9" + integrity sha512-XL3Qc9k7o0BykclGHtuRUz97FpF6rcKbP8LqszLeS2hKnINYcbUPYqg46EhbwVhFOUJE+XhT3idrSO1e/D6jtQ== -react-native-reanimated-zoom@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.1.tgz#f8f7ab088df920e612dce4cd77a2cd772b50bc17" - integrity sha512-/RlmFwfRbRABMWJbZZ51u9wEtDXQ6cR5oM6X9/NAJZhg9KDXzy8Ijt/DYSOsEFMIE2BrZZCY7v/UsM3XdsNdFA== +react-native-reanimated-zoom@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/react-native-reanimated-zoom/-/react-native-reanimated-zoom-0.3.2.tgz#11ffcf9d518023cca68ac1968ddf836abd4653a4" + integrity sha512-p/IVINRdejc+hXoHIXuC3fl1ewlZLYTXZ9ShjLkEJY8SXa4swFFLWzoERwhJxYhc7D6Mxc5cQOTxpiEp2bAVGw== react-native-reanimated@^2.12.0: version "2.12.0" From 5c255ffa6d426cdce353e205cae347309325e478 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 19:42:49 +0100 Subject: [PATCH 20/25] Prevent going back when zoomed --- .../react-native-reanimated-zoom+0.3.2.patch | 41 +++++++++++++++++++ src/screens/ImagesViewer.tsx | 19 +++++---- 2 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 patches/react-native-reanimated-zoom+0.3.2.patch diff --git a/patches/react-native-reanimated-zoom+0.3.2.patch b/patches/react-native-reanimated-zoom+0.3.2.patch new file mode 100644 index 00000000..8ac6cd3a --- /dev/null +++ b/patches/react-native-reanimated-zoom+0.3.2.patch @@ -0,0 +1,41 @@ +diff --git a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts +index 38fb6f1..e93c288 100644 +--- a/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts ++++ b/node_modules/react-native-reanimated-zoom/lib/typescript/zoom.d.ts +@@ -6,6 +6,7 @@ declare type Props = { + minimumZoomScale?: number; + maximumZoomScale?: number; + simultaneousGesture?: GestureType; ++ isZoomed?: SharedValue; + } & ViewProps; + export declare function Zoom(props: Props): JSX.Element; + export {}; +diff --git a/node_modules/react-native-reanimated-zoom/src/zoom.tsx b/node_modules/react-native-reanimated-zoom/src/zoom.tsx +index e07b415..d57a1eb 100644 +--- a/node_modules/react-native-reanimated-zoom/src/zoom.tsx ++++ b/node_modules/react-native-reanimated-zoom/src/zoom.tsx +@@ -7,6 +7,7 @@ import Animated, { + withTiming, + cancelAnimation, + runOnJS, ++ SharedValue, + } from 'react-native-reanimated'; + import { + Gesture, +@@ -20,6 +21,7 @@ type Props = { + minimumZoomScale?: number; + maximumZoomScale?: number; + simultaneousGesture?: GestureType; ++ isZoomed?: SharedValue; + } & ViewProps; + + export function Zoom(props: Props) { +@@ -39,7 +41,7 @@ export function Zoom(props: Props) { + const originY = useSharedValue(0); + const scale = useSharedValue(1); + const isPinching = useSharedValue(false); +- const isZoomed = useSharedValue(false); ++ const isZoomed = props.isZoomed || useSharedValue(false); + const viewHeight = useSharedValue(0); + const viewWidth = useSharedValue(0); + diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index d9244a3e..b81aba23 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -4,11 +4,12 @@ import { HeaderCenter, HeaderLeft, HeaderRight } from '@components/Header' import { useActionSheet } from '@expo/react-native-action-sheet' import { RootStackScreenProps } from '@utils/navigation/navigators' import { useTheme } from '@utils/styles/ThemeManager' -import React, { useCallback, useRef, useState } from 'react' +import React, { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' import { Dimensions, FlatList, + Image, PixelRatio, Platform, Share, @@ -16,10 +17,9 @@ import { View, ViewToken } from 'react-native' -import FlashMessage from 'react-native-flash-message' import { Directions, Gesture, LongPressGestureHandler } from 'react-native-gesture-handler' import { LiveTextImageView } from 'react-native-live-text-image-view' -import { runOnJS } from 'react-native-reanimated' +import { runOnJS, useSharedValue } from 'react-native-reanimated' import { Zoom, createZoomListComponent } from 'react-native-reanimated-zoom' import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context' import saveImage from './ImageViewer/save' @@ -48,8 +48,6 @@ const ScreenImagesViewer = ({ const initialIndex = imageUrls.findIndex(image => image.id === id) const [currentIndex, setCurrentIndex] = useState(initialIndex) - const messageRef = useRef(null) - const { showActionSheetWithOptions } = useActionSheet() const onPress = useCallback(() => { analytics('imageviewer_more_press') @@ -85,6 +83,8 @@ const ScreenImagesViewer = ({ ) }, [currentIndex]) + const isZoomed = useSharedValue(false) + const renderItem = React.useCallback( ({ item @@ -102,10 +102,15 @@ const ScreenImagesViewer = ({ return ( 8 ? 8 : max} simultaneousGesture={Gesture.Fling() .direction(Directions.DOWN) - .onStart(() => runOnJS(navigation.goBack)())} + .onStart(() => { + if (isZoomed.value === false) { + runOnJS(navigation.goBack)() + } + })} children={ ) }, - [] + [isZoomed.value] ) const onViewableItemsChanged = useCallback( From c75ecefb09e3312a7faf14bb031c44b2e448bd25 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 21:54:24 +0100 Subject: [PATCH 21/25] Fixed #424 --- src/components/Relationship/Outgoing.tsx | 2 +- src/components/Timeline/Shared/Actions.tsx | 78 +++++----------------- src/screens/Compose.tsx | 4 +- 3 files changed, 17 insertions(+), 67 deletions(-) diff --git a/src/components/Relationship/Outgoing.tsx b/src/components/Relationship/Outgoing.tsx index 13c9b229..123ac90d 100644 --- a/src/components/Relationship/Outgoing.tsx +++ b/src/components/Relationship/Outgoing.tsx @@ -33,7 +33,7 @@ const RelationshipOutgoing = React.memo( queryKeyRelationship, [res] ) - if (action === 'follow' || action === 'block') { + if (action === 'block') { const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }] queryClient.invalidateQueries(queryKey) } diff --git a/src/components/Timeline/Shared/Actions.tsx b/src/components/Timeline/Shared/Actions.tsx index 654c47ec..ddf1fdd3 100644 --- a/src/components/Timeline/Shared/Actions.tsx +++ b/src/components/Timeline/Shared/Actions.tsx @@ -48,40 +48,18 @@ const TimelineActions: React.FC = ({ const theParams = params as MutationVarsTimelineUpdateStatusProperty if ( // Un-bookmark from bookmarks page - (queryKey[1].page === 'Bookmarks' && - theParams.payload.property === 'bookmarked') || + (queryKey[1].page === 'Bookmarks' && theParams.payload.property === 'bookmarked') || // Un-favourite from favourites page - (queryKey[1].page === 'Favourites' && - theParams.payload.property === 'favourited') || - // Un-reblog from following page - (queryKey[1].page === 'Following' && - theParams.payload.property === 'reblogged' && - theParams.payload.currentValue === true) + (queryKey[1].page === 'Favourites' && theParams.payload.property === 'favourited') ) { queryClient.invalidateQueries(queryKey) - } else if ( - theParams.payload.property === 'reblogged' && - queryKey[1].page !== 'Following' - ) { - // When reblogged, update cache of following page - const tempQueryKey: QueryKeyTimeline = [ - 'Timeline', - { page: 'Following' } - ] - queryClient.invalidateQueries(tempQueryKey) } else if (theParams.payload.property === 'favourited') { // When favourited, update favourited page - const tempQueryKey: QueryKeyTimeline = [ - 'Timeline', - { page: 'Favourites' } - ] + const tempQueryKey: QueryKeyTimeline = ['Timeline', { page: 'Favourites' }] queryClient.invalidateQueries(tempQueryKey) } else if (theParams.payload.property === 'bookmarked') { // When bookmarked, update bookmark page - const tempQueryKey: QueryKeyTimeline = [ - 'Timeline', - { page: 'Bookmarks' } - ] + const tempQueryKey: QueryKeyTimeline = ['Timeline', { page: 'Bookmarks' }] queryClient.invalidateQueries(tempQueryKey) } }, @@ -91,9 +69,7 @@ const TimelineActions: React.FC = ({ theme, type: 'error', message: t('common:message.error.message', { - function: t( - `shared.actions.${correctParam.payload.property}.function` - ) + function: t(`shared.actions.${correctParam.payload.property}.function`) }), ...(err.status && typeof err.status === 'number' && @@ -182,11 +158,7 @@ const TimelineActions: React.FC = ({ const childrenReply = useMemo( () => ( <> - + {status.replies_count > 0 ? ( = ({ = ({ const color = (state: boolean) => (state ? colors.red : colors.secondary) return ( <> - + {status.favourites_count > 0 ? ( = ({ const childrenBookmark = useMemo(() => { const color = (state: boolean) => (state ? colors.yellow : colors.secondary) return ( - + ) }, [status.bookmarked]) return ( = ({ = ({ onPress={onPressReblog} children={childrenReblog} disabled={ - status.visibility === 'direct' || - (status.visibility === 'private' && !ownAccount) + status.visibility === 'direct' || (status.visibility === 'private' && !ownAccount) } /> = ({ > = ({ } else { dispatch(updateStoreReview(1)) } - const queryKey: QueryKeyTimeline = ['Timeline', { page: 'Following' }] - queryClient.invalidateQueries(queryKey) switch (params?.type) { case 'edit': From 4f22e4bd78a3b62cfd6c9c8e2de99447fd7dca96 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 22:15:51 +0100 Subject: [PATCH 22/25] Fixed #425 --- src/components/ContextMenu/account.ts | 57 ++++++++++++++++++++------- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/src/components/ContextMenu/account.ts b/src/components/ContextMenu/account.ts index 02b851b5..53a9aa44 100644 --- a/src/components/ContextMenu/account.ts +++ b/src/components/ContextMenu/account.ts @@ -9,6 +9,7 @@ import { import { getInstanceAccount } from '@utils/slices/instancesSlice' import { useTheme } from '@utils/styles/ThemeManager' import { useTranslation } from 'react-i18next' +import { Platform } from 'react-native' import { ContextMenuAction } from 'react-native-context-menu-view' import { useQueryClient } from 'react-query' import { useSelector } from 'react-redux' @@ -94,22 +95,50 @@ const contextMenuAccount = ({ context: (relationship?.muting || false).toString() }), systemIcon: 'eye.slash' - }, - { - id: 'account-block', - title: t('account.block.action', { - context: (relationship?.blocking || false).toString() - }), - systemIcon: 'xmark.circle', - destructive: true - }, - { - id: 'account-reports', - title: t('account.reports.action'), - systemIcon: 'flag', - destructive: true } ) + switch (Platform.OS) { + case 'ios': + actions.push({ + id: 'account', + title: t('account.title'), + actions: [ + { + id: 'account-block', + title: t('account.block.action', { + context: (relationship?.blocking || false).toString() + }), + systemIcon: 'xmark.circle', + destructive: true + }, + { + id: 'account-reports', + title: t('account.reports.action'), + systemIcon: 'flag', + destructive: true + } + ] + }) + break + default: + actions.push( + { + id: 'account-block', + title: t('account.block.action', { + context: (relationship?.blocking || false).toString() + }), + systemIcon: 'xmark.circle', + destructive: true + }, + { + id: 'account-reports', + title: t('account.reports.action'), + systemIcon: 'flag', + destructive: true + } + ) + break + } } return (index: number) => { From fa0d28acd1e66a1a8c791cc7216c0fb84c3ac2c0 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 22:29:45 +0100 Subject: [PATCH 23/25] Fixed #426 --- src/components/Emojis/List.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/components/Emojis/List.tsx b/src/components/Emojis/List.tsx index 0ccb2c55..bf3d2281 100644 --- a/src/components/Emojis/List.tsx +++ b/src/components/Emojis/List.tsx @@ -54,9 +54,6 @@ const EmojisList = () => { const addedLength = spaceFront.length + shortcode.length + spaceRear.length setSelection({ start: selection.start + addedLength }) - ref?.current?.setNativeProps({ - selection: { start: selection.start + addedLength } - }) } const listItem = ({ index, item }: { item: Mastodon.Emoji[]; index: number }) => { From cc3d5b14e5a8092d72cf2a806f08885b34d2c04b Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 23:43:42 +0100 Subject: [PATCH 24/25] Fixed #427 --- src/components/Timeline/Shared/Actions.tsx | 99 ++++++++++++++++++---- src/i18n/en/components/timeline.json | 7 +- src/utils/queryHooks/timeline.ts | 16 +++- 3 files changed, 101 insertions(+), 21 deletions(-) diff --git a/src/components/Timeline/Shared/Actions.tsx b/src/components/Timeline/Shared/Actions.tsx index ddf1fdd3..46e98e1b 100644 --- a/src/components/Timeline/Shared/Actions.tsx +++ b/src/components/Timeline/Shared/Actions.tsx @@ -2,6 +2,7 @@ import analytics from '@components/analytics' import Icon from '@components/Icon' import { displayMessage } from '@components/Message' import CustomText from '@components/Text' +import { useActionSheet } from '@expo/react-native-action-sheet' import { useNavigation } from '@react-navigation/native' import { StackNavigationProp } from '@react-navigation/stack' import { RootStackParamList } from '@utils/navigation/navigators' @@ -95,25 +96,87 @@ const TimelineActions: React.FC = ({ queryKey }) }, [status.replies_count]) + const { showActionSheetWithOptions } = useActionSheet() const onPressReblog = useCallback(() => { - analytics('timeline_shared_actions_reblog_press', { - page: queryKey[1].page, - count: status.reblogs_count, - current: status.reblogged - }) - mutation.mutate({ - type: 'updateStatusProperty', - queryKey, - rootQueryKey, - id: status.id, - reblog, - payload: { - property: 'reblogged', - currentValue: status.reblogged, - propertyCount: 'reblogs_count', - countValue: status.reblogs_count - } - }) + if (!status.reblogged) { + showActionSheetWithOptions( + { + title: t('shared.actions.reblogged.options.title'), + options: [ + t('shared.actions.reblogged.options.public'), + t('shared.actions.reblogged.options.unlisted'), + t('common:buttons.cancel') + ], + cancelButtonIndex: 2 + }, + (selectedIndex: number) => { + switch (selectedIndex) { + case 0: + analytics('timeline_shared_actions_reblog_public_press', { + page: queryKey[1].page, + count: status.reblogs_count, + current: status.reblogged + }) + mutation.mutate({ + type: 'updateStatusProperty', + queryKey, + rootQueryKey, + id: status.id, + reblog, + payload: { + property: 'reblogged', + currentValue: status.reblogged, + propertyCount: 'reblogs_count', + countValue: status.reblogs_count, + visibility: 'public' + } + }) + break + case 1: + analytics('timeline_shared_actions_reblog_unlisted_press', { + page: queryKey[1].page, + count: status.reblogs_count, + current: status.reblogged + }) + mutation.mutate({ + type: 'updateStatusProperty', + queryKey, + rootQueryKey, + id: status.id, + reblog, + payload: { + property: 'reblogged', + currentValue: status.reblogged, + propertyCount: 'reblogs_count', + countValue: status.reblogs_count, + visibility: 'unlisted' + } + }) + break + } + } + ) + } else { + analytics('timeline_shared_actions_reblog_press', { + page: queryKey[1].page, + count: status.reblogs_count, + current: status.reblogged + }) + mutation.mutate({ + type: 'updateStatusProperty', + queryKey, + rootQueryKey, + id: status.id, + reblog, + payload: { + property: 'reblogged', + currentValue: status.reblogged, + propertyCount: 'reblogs_count', + countValue: status.reblogs_count, + visibility: 'public' + } + }) + } }, [status.reblogged, status.reblogs_count]) const onPressFavourite = useCallback(() => { analytics('timeline_shared_actions_favourite_press', { diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index 066eade6..6ae14037 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "Boost this toot", - "function": "Boost toot" + "function": "Boost toot", + "options": { + "title": "Choose boost visibility", + "public": "Public boost", + "unlisted": "Unlist boost" + } }, "favourited": { "accessibilityLabel": "Add this toot to favourites", diff --git a/src/utils/queryHooks/timeline.ts b/src/utils/queryHooks/timeline.ts index d7e1b131..440969e9 100644 --- a/src/utils/queryHooks/timeline.ts +++ b/src/utils/queryHooks/timeline.ts @@ -293,11 +293,18 @@ export type MutationVarsTimelineUpdateStatusProperty = { countValue: undefined } | { - property: 'favourited' | 'reblogged' + property: 'favourited' currentValue: boolean propertyCount: 'favourites_count' | 'reblogs_count' countValue: number } + | { + property: 'reblogged' + currentValue: boolean + propertyCount: 'favourites_count' | 'reblogs_count' + countValue: number + visibility: 'public' | 'unlisted' + } | { property: 'poll' id: Mastodon.Poll['id'] @@ -371,11 +378,16 @@ const mutationFunction = async (params: MutationVarsTimeline) => { ...(params.payload.type === 'vote' && { body: formData }) }) default: + const body = new FormData() + if (params.payload.property === 'reblogged') { + body.append('visibility', params.payload.visibility) + } return apiInstance({ method: 'post', url: `statuses/${params.id}/${ params.payload.currentValue ? 'un' : '' - }${MapPropertyToUrl[params.payload.property]}` + }${MapPropertyToUrl[params.payload.property]}`, + body }) } case 'updateAccountProperty': From 534bfcaf78c408d9f35188b919f110e066c71ef4 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 31 Oct 2022 23:54:09 +0100 Subject: [PATCH 25/25] New Crowdin updates (#429) * New translations timeline.json (Chinese Simplified) * New translations timeline.json (Chinese Traditional) * New translations timeline.json (Vietnamese) * New translations timeline.json (Portuguese, Brazilian) * New translations timeline.json (Japanese) * New translations timeline.json (Korean) * New translations timeline.json (Italian) * New translations timeline.json (German) * New translations timeline.json (Chinese Simplified) * New translations timeline.json (Chinese Traditional) --- src/i18n/de/components/timeline.json | 7 ++++++- src/i18n/it/components/timeline.json | 7 ++++++- src/i18n/ja/components/timeline.json | 7 ++++++- src/i18n/ko/components/timeline.json | 7 ++++++- src/i18n/pt_BR/components/timeline.json | 7 ++++++- src/i18n/vi/components/timeline.json | 7 ++++++- src/i18n/zh-Hans/components/timeline.json | 7 ++++++- src/i18n/zh-Hant/components/timeline.json | 7 ++++++- 8 files changed, 48 insertions(+), 8 deletions(-) diff --git a/src/i18n/de/components/timeline.json b/src/i18n/de/components/timeline.json index 17e7ad6d..1d2ee95c 100644 --- a/src/i18n/de/components/timeline.json +++ b/src/i18n/de/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "Tröt boosten", - "function": "Boost" + "function": "Boost", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "Favorit", diff --git a/src/i18n/it/components/timeline.json b/src/i18n/it/components/timeline.json index 55a85ff5..d8881f6e 100644 --- a/src/i18n/it/components/timeline.json +++ b/src/i18n/it/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "Ricondividi questo toot", - "function": "Ricondividi toot" + "function": "Ricondividi toot", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "Apprezza questo toot", diff --git a/src/i18n/ja/components/timeline.json b/src/i18n/ja/components/timeline.json index 37ccf4c3..afb8fc0c 100644 --- a/src/i18n/ja/components/timeline.json +++ b/src/i18n/ja/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "このトゥートをブーストしますか?", - "function": "トゥートをブースト" + "function": "トゥートをブースト", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "このトゥートをお気に入りに追加", diff --git a/src/i18n/ko/components/timeline.json b/src/i18n/ko/components/timeline.json index 2cdda060..8d2216ab 100644 --- a/src/i18n/ko/components/timeline.json +++ b/src/i18n/ko/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "이 툿 부스트", - "function": "툿 부스트" + "function": "툿 부스트", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "이 툿 즐겨찾기에 추가", diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index c5f3f967..aa7d0e1c 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "Boost este toot", - "function": "Boost toot" + "function": "Boost toot", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "Adicionar este toot aos favoritos", diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index 4b1c863c..ddc59ca6 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "Đăng lại tút này", - "function": "Đăng lại tút" + "function": "Đăng lại tút", + "options": { + "title": "", + "public": "", + "unlisted": "" + } }, "favourited": { "accessibilityLabel": "Thích tút này", diff --git a/src/i18n/zh-Hans/components/timeline.json b/src/i18n/zh-Hans/components/timeline.json index 3fcbbf1d..1e2617d9 100644 --- a/src/i18n/zh-Hans/components/timeline.json +++ b/src/i18n/zh-Hans/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "转发此嘟文", - "function": "转嘟" + "function": "转嘟", + "options": { + "title": "选择转嘟可见性", + "public": "公开转嘟", + "unlisted": "不公开转嘟" + } }, "favourited": { "accessibilityLabel": "添加此嘟文至喜欢列表", diff --git a/src/i18n/zh-Hant/components/timeline.json b/src/i18n/zh-Hant/components/timeline.json index 06dded96..c2b1ad4f 100644 --- a/src/i18n/zh-Hant/components/timeline.json +++ b/src/i18n/zh-Hant/components/timeline.json @@ -38,7 +38,12 @@ }, "reblogged": { "accessibilityLabel": "轉發此嘟", - "function": "轉嘟" + "function": "轉嘟", + "options": { + "title": "選擇轉嘟範圍", + "public": "公開轉嘟", + "unlisted": "不公開轉嘟" + } }, "favourited": { "accessibilityLabel": "將嘟文加入最愛",