diff --git a/fastlane/metadata/en-US/release_notes.txt b/fastlane/metadata/en-US/release_notes.txt index ef42302b..38103b80 100644 --- a/fastlane/metadata/en-US/release_notes.txt +++ b/fastlane/metadata/en-US/release_notes.txt @@ -1,4 +1 @@ -Enjoy toooting! This version includes following improvements and fixes: -- Supports mute duration -- Long press to copy toot -- Button to fetch latest on load \ No newline at end of file +Enjoy toooting! This version includes following improvements and fixes: \ No newline at end of file diff --git a/fastlane/metadata/zh-Hans/release_notes.txt b/fastlane/metadata/zh-Hans/release_notes.txt index 9a737c94..7d229eb9 100644 --- a/fastlane/metadata/zh-Hans/release_notes.txt +++ b/fastlane/metadata/zh-Hans/release_notes.txt @@ -1,5 +1 @@ -tooot-ing愉快!此版本包括以下改进和修复: -- 新增neodb.social演出卡片 -- 支持选择隐藏用户时限 -- 长按复制嘟文 -- 新增获取最新嘟文按钮 \ No newline at end of file +tooot-ing愉快!此版本包括以下改进和修复: \ No newline at end of file diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5e52139f..e76d164a 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,24 +3,24 @@ PODS: - DoubleConversion (1.1.6) - EXApplication (5.3.0): - ExpoModulesCore - - EXAV (13.4.1): + - EXAV (13.5.0): - ExpoModulesCore - ReactCommon/turbomodule/core - - EXConstants (14.4.2): + - EXConstants (14.5.0): - ExpoModulesCore - - EXFileSystem (15.4.2): + - EXFileSystem (15.5.0): - ExpoModulesCore - EXFont (11.4.0): - ExpoModulesCore - EXNotifications (0.20.1): - ExpoModulesCore - - Expo (49.0.3): + - Expo (49.0.6): - ExpoModulesCore - - ExpoCrypto (12.4.1): + - ExpoCrypto (12.5.0): - ExpoModulesCore - ExpoHaptics (12.4.0): - ExpoModulesCore - - ExpoImage (1.3.2): + - ExpoImage (1.4.0): - ExpoModulesCore - SDWebImage (~> 5.15.8) - SDWebImageAVIFCoder (~> 0.10.0) @@ -30,13 +30,13 @@ PODS: - ExpoModulesCore - ExpoLocalization (14.3.0): - ExpoModulesCore - - ExpoModulesCore (1.5.7): + - ExpoModulesCore (1.5.9): - RCT-Folly (= 2021.07.22.00) - React-Core - React-NativeModulesApple - React-RCTAppDelegate - ReactCommon/turbomodule/core - - ExpoScreenOrientation (6.0.3): + - ExpoScreenOrientation (6.1.0): - ExpoModulesCore - RCT-Folly (= 2021.07.22.00) - React-Core @@ -46,11 +46,11 @@ PODS: - ExpoModulesCore - ExpoVideoThumbnails (7.4.0): - ExpoModulesCore - - ExpoWebBrowser (12.3.2): + - ExpoWebBrowser (12.4.0): - ExpoModulesCore - EXScreenCapture (5.3.0): - ExpoModulesCore - - EXSplashScreen (0.20.4): + - EXSplashScreen (0.20.5): - ExpoModulesCore - RCT-Folly (= 2021.07.22.00) - React-Core @@ -77,15 +77,18 @@ PODS: - libavif/core - libevent (2.1.12) - libvmaf (2.3.1) - - libwebp (1.2.4): - - libwebp/demux (= 1.2.4) - - libwebp/mux (= 1.2.4) - - libwebp/webp (= 1.2.4) - - libwebp/demux (1.2.4): + - libwebp (1.3.1): + - libwebp/demux (= 1.3.1) + - libwebp/mux (= 1.3.1) + - libwebp/sharpyuv (= 1.3.1) + - libwebp/webp (= 1.3.1) + - libwebp/demux (1.3.1): - libwebp/webp - - libwebp/mux (1.2.4): + - libwebp/mux (1.3.1): - libwebp/demux - - libwebp/webp (1.2.4) + - libwebp/sharpyuv (1.3.1) + - libwebp/webp (1.3.1): + - libwebp/sharpyuv - MMKV (1.3.0): - MMKVCore (~> 1.3.0) - MMKVCore (1.3.0) @@ -406,10 +409,10 @@ PODS: - React-Core - react-native-pager-view (6.2.0): - React-Core - - react-native-paste-input (0.6.2): + - react-native-paste-input (0.6.4): - React-Core - Swime (= 3.0.6) - - react-native-quick-base64 (2.0.6): + - react-native-quick-base64 (2.0.7): - React-Core - react-native-safe-area-context (4.7.1): - React-Core @@ -531,7 +534,7 @@ PODS: - React-Core - RNGestureHandler (2.12.0): - React-Core - - RNReanimated (3.3.0): + - RNReanimated (3.4.1): - DoubleConversion - FBLazyVector - glog @@ -560,12 +563,12 @@ PODS: - React-RCTText - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.22.1): + - RNScreens (3.23.0): - React-Core - React-RCTImage - - RNSentry (5.7.1): + - RNSentry (5.8.0): - React-Core - - Sentry/HybridSDK (= 8.8.0) + - Sentry/HybridSDK (= 8.9.3) - RNShareMenu (6.0.0): - React - RNSVG (13.10.0): @@ -573,7 +576,7 @@ PODS: - SDWebImage (5.15.8): - SDWebImage/Core (= 5.15.8) - SDWebImage/Core (5.15.8) - - SDWebImageAVIFCoder (0.10.0): + - SDWebImageAVIFCoder (0.10.1): - libavif (>= 0.11.0) - SDWebImage (~> 5.10) - SDWebImageSVGCoder (1.7.0): @@ -581,9 +584,9 @@ PODS: - SDWebImageWebPCoder (0.11.0): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.15) - - Sentry/HybridSDK (8.8.0): - - SentryPrivate (= 8.8.0) - - SentryPrivate (8.8.0) + - Sentry/HybridSDK (8.9.3): + - SentryPrivate (= 8.9.3) + - SentryPrivate (8.9.3) - SocketRocket (0.6.1) - Swime (3.0.6) - Yoga (1.14.0) @@ -855,25 +858,25 @@ SPEC CHECKSUMS: boost: 57d2868c099736d80fcd648bf211b4431e51a558 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 EXApplication: 02655a251434d564bb0e73291f5a490c74b5b76f - EXAV: f393dfc0b28214d62855a31e06eb21d426d6e2da - EXConstants: ce5bbea779da8031ac818c36bea41b10e14d04e1 - EXFileSystem: d7f59869885cfeab3ac771e2a8d0f5ed98cd3fdb + EXAV: 0f6f47ecd4d4aff93f486be494e28f8bdb3c9514 + EXConstants: ea6e3ff17f5c8926a4a7f35467d88b8af3230052 + EXFileSystem: 6acc93642ad8c3c3ffabd7adbd86f7af4d8eca52 EXFont: 738c44c390953ebcbab075a4848bfbef025fd9ee EXNotifications: 09394cbd7165f9a4a00a53328aa09bf874bae717 - Expo: d5956de70d4076190861f6730b93e75478b6faf8 - ExpoCrypto: a382ab9a2fa91f0b511ce1fe4d6baecee40a1615 + Expo: 5601f86edc81c7e7e1772b9af9ae58fa3b45ad53 + ExpoCrypto: 2347fbf8a5d80676b4266548df62df397fbb537c ExpoHaptics: 360af6898407ee4e8265d30a1a8fb16491a660eb - ExpoImage: e3170a9043c6a80080efbf2268b3df2334021949 + ExpoImage: d940c1a403aa25cb4461a7e082f74676a3f7af0f ExpoKeepAwake: be4cbd52d9b177cde0fd66daa1913afa3161fc1d ExpoLocalization: be37fdd0b5930c6a49cd307b4542f4b426d6134c - ExpoModulesCore: f8f3cac222bb0f574c77664d7e05817eaa97434b - ExpoScreenOrientation: ddf6968471e781c6b3f9e10824292b996f07f777 + ExpoModulesCore: e4e437139259c5a73530a8895af69774ff8ec12d + ExpoScreenOrientation: 786cb014ccf2ba54ac3f9b3214a9e20a9170cfff ExpoSecureStore: 57db3b6da8b59046e2057e95bf7738a8027b47c3 ExpoStoreReview: f154c9fdf3dbd877ca0115757f0b2b6f43dd9db4 ExpoVideoThumbnails: 3b5ec2a802a67b6e1a22d38b4526ef4619dd3938 - ExpoWebBrowser: 2c788f9c07718a780fe6d8bf2f6195c47609faaa + ExpoWebBrowser: 682823428c10629836f97f7c5fbf85825b6ac5b3 EXScreenCapture: 81002ba5fb40a367fba9047d223068abb558594d - EXSplashScreen: 89586b0961acd173b04713b7457949b063a659da + EXSplashScreen: c0e7f2d4a640f3b875808ed0b88575538daf6d82 FBLazyVector: 4cce221dd782d3ff7c4172167bba09d58af67ccb FBReactNativeSpec: c6bd9e179757b3c0ecf815864fae8032377903ef fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 @@ -883,7 +886,7 @@ SPEC CHECKSUMS: libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libvmaf: 27f523f1e63c694d14d534cd0fddd2fab0ae8711 - libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef + libwebp: 33dc822fbbf4503668d09f7885bbfedc76c45e96 MMKV: 9c6c3fa4ddd849f28c7b9a5c9d23aab84f14ee35 MMKVCore: 9bb7440b170181ac5b81f542ac258103542e693d RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 @@ -909,8 +912,8 @@ SPEC CHECKSUMS: react-native-mmkv: dea675cf9697ad35940f1687e98e133e1358ef9f react-native-netinfo: fefd4e98d75cbdd6e85fc530f7111a8afdf2b0c5 react-native-pager-view: 0ccb8bf60e2ebd38b1f3669fa3650ecce81db2df - react-native-paste-input: 3392800944a47c00dddbff23c31c281482209679 - react-native-quick-base64: 62290829c619fbabca4c41cfec75ae759d08fc1c + react-native-paste-input: 09f14cbfb646ad9d2ef79cdc6f3d45f337c10ad1 + react-native-quick-base64: a5dbe4528f1453e662fcf7351029500b8b63e7bb react-native-safe-area-context: 9697629f7b2cda43cf52169bb7e0767d330648c2 react-native-segmented-control: 2221962f5073e2e809aa3691e8e410fc10b60578 React-NativeModulesApple: c57f3efe0df288a6532b726ad2d0322a9bf38472 @@ -933,17 +936,17 @@ SPEC CHECKSUMS: RNCAsyncStorage: 09fc8595e6d6f6d5abf16b23a56b257d9c6b7c5b RNCClipboard: 3f0451a8100393908bea5c5c5b16f96d45f30bfc RNGestureHandler: dec4645026e7401a0899f2846d864403478ff6a5 - RNReanimated: 9f7068e43b9358a46a688d94a5a3adb258139457 - RNScreens: 50ffe2fa2342eabb2d0afbe19f7c1af286bc7fb3 - RNSentry: 4e4fc87b53002c015f644cb7207d4b598bc3703f + RNReanimated: 53ca20eee770c41173703f5948cd8898aa08262c + RNScreens: 6a8a3c6b808aa48dca1780df7b73ea524f602c63 + RNSentry: f9e637773502a61c7b455c4ce65bc7008ce22a6e RNShareMenu: cb9dac548c8bf147d06f0bf07296ad51ea9f5fc3 RNSVG: 80584470ff1ffc7994923ea135a3e5ad825546b9 SDWebImage: cb032eba469c54e0000e78bcb0a13cdde0a52798 - SDWebImageAVIFCoder: 4aeea8fdf65af5c18525ecb5bdd8b8ed9bb45019 + SDWebImageAVIFCoder: 8348fef6d0ec69e129c66c9fe4d74fbfbf366112 SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499 - Sentry: 927dfb29d18a14d924229a59cc2ad149f43349f2 - SentryPrivate: 4350d865f898224ab9fa02b37d6ee7fbb623f47e + Sentry: 97161cac725da1ecbe77d1445bf8a61c1e5667f1 + SentryPrivate: 9a76def09fb08f9501997b8df946e8097947b94f SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Swime: d7b2c277503b6cea317774aedc2dce05613f8b0b Yoga: 8796b55dba14d7004f980b54bcc9833ee45b28ce diff --git a/package.json b/package.json index 164d476f..dd6b0859 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tooot", - "version": "4.10.0", + "version": "4.10.1", "description": "tooot for Mastodon", "author": "xmflsct ", "license": "GPL-3.0-or-later", @@ -25,45 +25,45 @@ "@formatjs/intl-numberformat": "^8.7.0", "@formatjs/intl-pluralrules": "^5.2.4", "@formatjs/intl-relativetimeformat": "^11.2.4", - "@mattermost/react-native-paste-input": "^0.6.2", + "@mattermost/react-native-paste-input": "^0.6.4", "@neverdull-agency/expo-unlimited-secure-store": "^1.0.10", "@react-native-async-storage/async-storage": "~1.17.11", "@react-native-camera-roll/camera-roll": "^5.7.2", "@react-native-clipboard/clipboard": "^1.11.2", "@react-native-community/blur": "^4.3.2", "@react-native-community/netinfo": "^9.4.1", - "@react-native-firebase/app": "^18.1.0", + "@react-native-firebase/app": "^18.3.0", "@react-native-menu/menu": "^0.8.0", "@react-native-segmented-control/segmented-control": "^2.4.2", "@react-navigation/bottom-tabs": "^6.5.8", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@react-navigation/stack": "^6.3.17", - "@sentry/react-native": "^5.7.1", + "@sentry/react-native": "^5.8.0", "@sharcoux/slider": "^7.0.1", - "@tanstack/react-query": "^4.29.19", + "@tanstack/react-query": "^4.32.0", "axios": "^1.4.0", "diff": "^5.1.0", - "expo": "^49.0.3", - "expo-auth-session": "^5.0.2", - "expo-av": "^13.4.1", - "expo-constants": "^14.4.2", - "expo-crypto": "^12.4.1", - "expo-file-system": "^15.4.2", + "expo": "^49.0.6", + "expo-auth-session": "^5.1.0", + "expo-av": "^13.5.0", + "expo-constants": "^14.5.0", + "expo-crypto": "^12.5.0", + "expo-file-system": "^15.5.0", "expo-haptics": "^12.4.0", - "expo-image": "^1.3.2", + "expo-image": "^1.4.0", "expo-linking": "^5.0.2", "expo-localization": "^14.3.0", "expo-notifications": "^0.20.1", "expo-screen-capture": "^5.3.0", - "expo-screen-orientation": "^6.0.3", + "expo-screen-orientation": "^6.1.0", "expo-secure-store": "^12.3.1", - "expo-splash-screen": "^0.20.4", + "expo-splash-screen": "^0.20.5", "expo-store-review": "^6.4.0", "expo-video-thumbnails": "^7.4.0", - "expo-web-browser": "^12.3.2", + "expo-web-browser": "^12.4.0", "htmlparser2": "^9.0.0", - "i18next": "^23.2.11", + "i18next": "^23.4.1", "linkify-it": "^4.0.1", "lodash": "^4.17.21", "react": "^18.2.0", @@ -78,11 +78,11 @@ "react-native-language-detection": "^0.2.2", "react-native-mmkv": "^2.10.1", "react-native-pager-view": "^6.2.0", - "react-native-quick-base64": "^2.0.6", - "react-native-reanimated": "^3.3.0", + "react-native-quick-base64": "^2.0.7", + "react-native-reanimated": "^3.4.1", "react-native-reanimated-zoom": "^0.3.3", "react-native-safe-area-context": "^4.7.1", - "react-native-screens": "^3.22.1", + "react-native-screens": "^3.23.0", "react-native-share-menu": "^6.0.0", "react-native-svg": "^13.10.0", "react-native-swipe-list-view": "^3.2.9", @@ -91,21 +91,20 @@ "zeego": "^1.6.2" }, "devDependencies": { - "@babel/core": "^7.22.8", + "@babel/core": "^7.22.9", "@babel/plugin-proposal-optional-chaining": "^7.21.0", "@babel/preset-typescript": "^7.22.5", - "@expo/config": "^8.1.2", + "@expo/config": "^8.2.0", "@react-native/metro-config": "^0.72.9", "@types/diff": "^5.0.3", "@types/linkify-it": "^3.0.2", - "@types/lodash": "^4.14.195", - "@types/react": "^18.2.14", + "@types/lodash": "^4.14.196", + "@types/react": "^18.2.17", "@types/react-dom": "^18.2.7", "@types/react-native-share-menu": "^5.0.2", "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-transform-remove-console": "^6.9.4", "chalk": "^4.1.2", - "deprecated-react-native-prop-types": "^4.1.0", "dotenv": "^16.3.1", "react-native-clean-project": "^4.0.1", "typescript": "^5.1.6" diff --git a/src/i18n/nl/screens/tabs.json b/src/i18n/nl/screens/tabs.json index 4f761b17..deb6b6cb 100644 --- a/src/i18n/nl/screens/tabs.json +++ b/src/i18n/nl/screens/tabs.json @@ -418,10 +418,10 @@ "name": "Geschiedenis bewerken" }, "mute": { - "name": "", - "mute": "", - "description": "", - "notification": "", + "name": "Demp {{acct}}", + "mute": "Dempen", + "description": "Verberg berichten van deze gebruiker en berichten die hen vermelden, maar het geeft hen nog steeds de mogelijkheid om je posts te zien en je te volgen.", + "notification": "Verberg ook meldingen van deze gebruiker", "duration": { "heading": "Voor duur", "0": "Onbepaalde tijd", diff --git a/src/i18n/pt_BR/common.json b/src/i18n/pt_BR/common.json index 137e9f67..a23e3557 100644 --- a/src/i18n/pt_BR/common.json +++ b/src/i18n/pt_BR/common.json @@ -9,7 +9,7 @@ "delete": "Excluir", "done": "Concluído", "confirm": "Confirmar", - "add": "" + "add": "Adicionar" }, "customEmoji": { "accessibilityLabel": "Emoji personalizado {{emoji}}" diff --git a/src/i18n/pt_BR/components/parse.json b/src/i18n/pt_BR/components/parse.json index 105cd8de..70c22310 100644 --- a/src/i18n/pt_BR/components/parse.json +++ b/src/i18n/pt_BR/components/parse.json @@ -2,7 +2,7 @@ "HTML": { "accessibilityHint": "Toque para expandir ou recolher conteúdo", "expanded": "{{hint}}{{moreLines}}", - "moreLines": "", + "moreLines": " ({{count}} mais linhas)", "defaultHint": "Toot longo" } } \ No newline at end of file diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index d86f3eb5..35d0b5a8 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -37,7 +37,7 @@ "notification": "{{name}} deu boost no teu toot" }, "update": "Toot foi editado", - "admin.sign_up": "", + "admin.sign_up": "{{name}} entrou na instância", "admin.report": "" }, "actions": { diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 4f2e3137..58be38bf 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -11,13 +11,13 @@ "segments": { "federated": "Global", "local": "Local", - "explore": "" + "explore": "Explorar" }, "exploring": { - "heading": "", + "heading": "Explorando", "trending": "", "followRemote": "", - "noTitle": "", + "noTitle": "Sem título", "errors": { "existed": "Você já está seguindo esta instância.", "notAvailable": "A linha do tempo desta instância não é acessível ao público. Por favor, tente outra instância." diff --git a/src/i18n/sv/common.json b/src/i18n/sv/common.json index b069166d..8fe18fcc 100644 --- a/src/i18n/sv/common.json +++ b/src/i18n/sv/common.json @@ -9,7 +9,7 @@ "delete": "Radera", "done": "Klar", "confirm": "Bekräfta", - "add": "" + "add": "Lägg till" }, "customEmoji": { "accessibilityLabel": "Anpassad emoji {{emoji}}" diff --git a/src/i18n/sv/components/contextMenu.json b/src/i18n/sv/components/contextMenu.json index e6b6033b..1fa6098f 100644 --- a/src/i18n/sv/components/contextMenu.json +++ b/src/i18n/sv/components/contextMenu.json @@ -16,7 +16,7 @@ "action_true": "Sluta tysta användare" }, "followAs": { - "trigger": "", + "trigger": "Följ som ...", "succeed_default": "Följer nu @{{target}} med @{{source}}", "succeed_locked": "Följförfrågan skickades till @{{target}} med {{source}}, väntar på godkännande", "failed": "Följ som" @@ -56,7 +56,7 @@ }, "hashtag": { "follow": { - "action_false": "", + "action_false": "Följ", "action_true": "" }, "filter": { @@ -100,7 +100,7 @@ }, "filter": { "action_false": "", - "action_true": "" + "action_true": "Hantera filter ..." } } } \ No newline at end of file diff --git a/src/i18n/sv/screens/tabs.json b/src/i18n/sv/screens/tabs.json index f017efa2..e78ae804 100644 --- a/src/i18n/sv/screens/tabs.json +++ b/src/i18n/sv/screens/tabs.json @@ -89,7 +89,7 @@ "name": "" }, "preferencesFilterEdit": { - "name": "" + "name": "Redigera filter" }, "profile": { "name": "Redigera profil" @@ -195,16 +195,16 @@ } }, "preferencesFilter": { - "name": "", + "name": "Namn", "expiration": "", "expirationOptions": { - "0": "", - "1800": "", - "3600": "", - "43200": "", - "86400": "", - "604800": "", - "18144000": "" + "0": "Aldrig", + "1800": "Efter 30 minuter", + "3600": "Efter 1 timme", + "43200": "Efter 12 timmar", + "86400": "Efter 1 dag", + "604800": "Efter 1 vecka", + "18144000": "Efter 1 månad" }, "context": "", "contexts": { @@ -425,10 +425,10 @@ "duration": { "heading": "", "0": "", - "1800": "", - "3600": "", - "86400": "", - "604800": "" + "1800": "30 minuter", + "3600": "1 timme", + "86400": "1 dag", + "604800": "1 vecka" } }, "report": { diff --git a/src/i18n/zh-Hant/screens/tabs.json b/src/i18n/zh-Hant/screens/tabs.json index f5b61e6e..e7dcaeff 100644 --- a/src/i18n/zh-Hant/screens/tabs.json +++ b/src/i18n/zh-Hant/screens/tabs.json @@ -418,8 +418,8 @@ "name": "編輯歷史" }, "mute": { - "name": "禁音{{acct}}", - "mute": "禁音", + "name": "靜音{{acct}}", + "mute": "靜音", "description": "該使用者的嘟文及提到該使用者的嘟文都會被隱藏,但他們仍然可以看到你的嘟文,也可以關注你。", "notification": "同時隱藏來自該使用者的通知", "duration": { diff --git a/src/screens/Tabs/Me/Push.tsx b/src/screens/Tabs/Me/Push.tsx index 5cb54529..191ee5d3 100644 --- a/src/screens/Tabs/Me/Push.tsx +++ b/src/screens/Tabs/Me/Push.tsx @@ -23,6 +23,20 @@ import { useTranslation } from 'react-i18next' import { AppState, Linking, Platform, ScrollView, View } from 'react-native' import { fromByteArray } from 'react-native-quick-base64' +export const getPushPath = ({ + expoToken, + domain, + accountId +}: { + expoToken?: string + domain: string + accountId: string | number +}) => `${expoToken}/${domain}/${accountId}` +export const getPushendpoint = (pushPath: string) => + `https://${TOOOT_API_DOMAIN}/push/send/${pushPath}/${(Math.random() + 1) + .toString(36) + .substring(2)}` + const TabMePush: React.FC = () => { const { colors } = useTheme() const { t } = useTranslation('screenTabs') @@ -116,7 +130,7 @@ const TabMePush: React.FC = () => { )) : null - const pushPath = `${expoToken}/${domain}/${accountId}` + const pushPath = getPushPath({ expoToken, domain, accountId }) const accountFull = `@${accountAcct}@${accountDomain}` return appsQuery.isFetched ? ( @@ -176,17 +190,13 @@ const TabMePush: React.FC = () => { if (push.key?.length <= 10) { authKey = fromByteArray(Crypto.getRandomBytes(16)) } - // Turning on - const randomPath = (Math.random() + 1).toString(36).substring(2) - - const endpoint = `https://${TOOOT_API_DOMAIN}/push/send/${pushPath}/${randomPath}` const body: { subscription: any data: { alerts: Mastodon.PushSubscription['alerts'] } } = { subscription: { - endpoint, + endpoint: getPushendpoint(pushPath), keys: { p256dh: 'BMn2PLpZrMefG981elzG6SB1EY9gU7QZwmtZ/a/J2vUeWG+zXgeskMPwHh4T/bxsD4l7/8QT94F57CbZqYRRfJo=', diff --git a/src/screens/Tabs/Me/Settings/Dev.tsx b/src/screens/Tabs/Me/Settings/Dev.tsx index 4ea81e24..59fafd39 100644 --- a/src/screens/Tabs/Me/Settings/Dev.tsx +++ b/src/screens/Tabs/Me/Settings/Dev.tsx @@ -6,7 +6,7 @@ import { useNavigation } from '@react-navigation/native' import { androidActionSheetStyles } from '@utils/helpers/androidActionSheetStyles' import { urlMatcher } from '@utils/helpers/urlMatcher' import { storage } from '@utils/storage' -import { getGlobalStorage, useGlobalStorage } from '@utils/storage/actions' +import { getGlobalStorage, setGlobalStorage, useGlobalStorage } from '@utils/storage/actions' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React from 'react' @@ -59,6 +59,17 @@ const SettingsDev: React.FC = () => { }} onPress={() => displayMessage({ message: 'This is a testing message' })} /> +