diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 55547f3c..48ee744d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -380,7 +380,7 @@ PODS: - React-Core - react-native-cameraroll (4.1.2): - React-Core - - react-native-netinfo (6.2.0): + - react-native-netinfo (7.1.2): - React-Core - react-native-pager-view (5.4.9): - React-Core @@ -453,7 +453,7 @@ PODS: - React-jsi (= 0.66.3) - React-logger (= 0.66.3) - React-perflogger (= 0.66.3) - - RNCAsyncStorage (1.15.11): + - RNCAsyncStorage (1.15.13): - React-Core - RNFastImage (8.5.11): - React-Core @@ -461,7 +461,7 @@ PODS: - SDWebImageWebPCoder (~> 0.8.4) - RNGestureHandler (1.10.3): - React-Core - - RNReanimated (2.2.6): + - RNReanimated (2.2.4): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -845,7 +845,7 @@ SPEC CHECKSUMS: react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c react-native-blurhash: d978f8017ed091d9e1179775fe7bac14297e6e1e react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 - react-native-netinfo: de0d4343f8d5ec9b92653b17a0ef47091317986a + react-native-netinfo: 07e8299fff4d2bea17d00b519d4f9c67c7dbbe9b react-native-pager-view: 3ee7d4c7697fb3ef788346e834a60cca97ed8540 react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 @@ -861,10 +861,10 @@ SPEC CHECKSUMS: React-RCTVibration: 50cfe7049167cfc7e83ac5542c6fff0c76791a9b React-runtimeexecutor: bbbdb3d8fcf327c6e2249ee71b6ef1764b7dc266 ReactCommon: 9bac022ab71596f2b0fde1268272543184c63971 - RNCAsyncStorage: eb05c0284dd6b50b32f92fad55e2a41e03358c43 + RNCAsyncStorage: ac55c090d35b880ac47a7807ab797854afc640ae RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 - RNReanimated: 20aca2bc881924158c504343755b00bc3cb08025 + RNReanimated: 65583befd5706cc9c86ae9a081786181ced37b93 RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3 RNSentry: 97bc62fa65b7d663daee16fbf9771470852217cf RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f diff --git a/package.json b/package.json index aa7a87b9..dbb09029 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "dependencies": { "@expo/react-native-action-sheet": "3.12.0", "@neverdull-agency/expo-unlimited-secure-store": "1.0.10", - "@react-native-async-storage/async-storage": "1.15.11", + "@react-native-async-storage/async-storage": "1.15.13", "@react-native-community/blur": "3.6.0", "@react-native-community/cameraroll": "4.1.2", - "@react-native-community/netinfo": "6.2.0", + "@react-native-community/netinfo": "7.1.2", "@react-native-community/segmented-control": "2.2.2", "@react-navigation/bottom-tabs": "6.0.9", "@react-navigation/native": "6.0.6", @@ -69,7 +69,7 @@ "lodash": "4.17.21", "react": "17.0.2", "react-dom": "17.0.2", - "react-i18next": "11.14.2", + "react-i18next": "11.14.3", "react-native": "0.66.3", "react-native-animated-spinkit": "1.5.2", "react-native-blurhash": "1.1.5", @@ -79,13 +79,13 @@ "react-native-gesture-handler": "1.10.3", "react-native-htmlview": "0.16.0", "react-native-pager-view": "5.4.9", - "react-native-reanimated": "npm:react-native-reanimated-savv@2.2.6", + "react-native-reanimated": "2.2.4", "react-native-safe-area-context": "3.3.2", "react-native-screens": "3.9.0", "react-native-svg": "12.1.1", "react-native-swipe-list-view": "3.2.9", "react-native-tab-view": "3.1.1", - "react-query": "3.32.3", + "react-query": "3.33.6", "react-redux": "7.2.6", "react-timeago": "6.2.1", "redux-persist": "6.0.0", @@ -98,15 +98,15 @@ "@babel/core": "7.16.0", "@babel/plugin-proposal-optional-chaining": "7.16.0", "@babel/preset-typescript": "7.16.0", - "@expo/config": "6.0.7", - "@types/lodash": "4.14.176", - "@types/react": "17.0.34", + "@expo/config": "6.0.9", + "@types/lodash": "4.14.177", + "@types/react": "17.0.37", "@types/react-dom": "17.0.11", - "@types/react-native": "0.66.4", + "@types/react-native": "0.66.6", "@types/react-redux": "7.1.20", "@types/react-timeago": "4.1.3", "@types/valid-url": "1.0.3", - "@welldone-software/why-did-you-render": "6.2.1", + "@welldone-software/why-did-you-render": "6.2.3", "babel-plugin-module-resolver": "4.1.0", "babel-plugin-transform-remove-console": "6.9.4", "chalk": "4.1.2", @@ -114,6 +114,6 @@ "patch-package": "6.4.7", "postinstall-postinstall": "2.1.0", "react-native-clean-project": "3.6.7", - "typescript": "4.4.4" + "typescript": "4.5.2" } } diff --git a/src/components/Timeline/Shared/Content.tsx b/src/components/Timeline/Shared/Content.tsx index 61c46d10..f99f4a04 100644 --- a/src/components/Timeline/Shared/Content.tsx +++ b/src/components/Timeline/Shared/Content.tsx @@ -1,6 +1,8 @@ import { ParseHTML } from '@components/Parse' +import { getInstanceAccount } from '@utils/slices/instancesSlice' import React from 'react' import { useTranslation } from 'react-i18next' +import { useSelector } from 'react-redux' export interface Props { status: Mastodon.Status @@ -17,6 +19,7 @@ const TimelineContent = React.memo( disableDetails = false }: Props) => { const { t } = useTranslation('componentTimeline') + const instanceAccount = useSelector(getInstanceAccount, () => true) return ( <> @@ -41,7 +44,9 @@ const TimelineContent = React.memo( emojis={status.emojis} mentions={status.mentions} tags={status.tags} - numberOfLines={1} + numberOfLines={ + instanceAccount.preferences['reading:expand:spoilers'] ? 999 : 1 + } expandHint={t('shared.content.expandHint')} highlighted={highlighted} disableDetails={disableDetails} diff --git a/src/utils/migrations/instances/migration.ts b/src/utils/migrations/instances/migration.ts index 82e39027..528380d1 100644 --- a/src/utils/migrations/instances/migration.ts +++ b/src/utils/migrations/instances/migration.ts @@ -49,9 +49,11 @@ const instancesMigration = { } }, 6: (state: InstanceV5) => { - return state.instances.map(instance => { - return { ...instance, configuration: undefined } - }) + return { + instances: state.instances.map(instance => { + return { ...instance, configuration: undefined } + }) + } } } diff --git a/yarn.lock b/yarn.lock index bf4ba689..514b4b96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1336,14 +1336,14 @@ xcode "^3.0.1" xml2js "0.4.23" -"@expo/config-plugins@4.0.7": - version "4.0.7" - resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-4.0.7.tgz#c3cd8d2297edd779576b71a8ad16fc8b80c08eda" - integrity sha512-m160Y039LJcI8Q4arzA9edWNRPPnLnTe5tB41812Mn1BAmtoZy9OMs4Rj78OKFkMx6A9JJKUTWMnP/FVAbeMiw== +"@expo/config-plugins@4.0.9": + version "4.0.9" + resolved "https://registry.yarnpkg.com/@expo/config-plugins/-/config-plugins-4.0.9.tgz#52c5bee8411185fc4a340072fbed3584d0409234" + integrity sha512-3wv0uhG5U5O4BGX2qm4gjFK3jvYVTy0raFsR6B/2zoBNgD3lXF8Ae5osVN118aKNZb2B7SMx3V7McunZhf7RXg== dependencies: "@expo/config-types" "^43.0.1" - "@expo/json-file" "8.2.33" - "@expo/plist" "0.0.15" + "@expo/json-file" "8.2.34" + "@expo/plist" "0.0.16" "@react-native/normalize-color" "^2.0.0" chalk "^4.1.2" debug "^4.3.1" @@ -1424,15 +1424,15 @@ slugify "^1.3.4" sucrase "^3.20.0" -"@expo/config@6.0.7": - version "6.0.7" - resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.7.tgz#c84c76c907e65e0f92ebc67e11173c62de1ed513" - integrity sha512-aOsm+ZSqCgQrDf+UPHM62QGIpNdt+D3NJSFdHECnTUS6vWiTXhdVS23VQ4ris2thQS0ZRKKlX90S8CBUU49fIg== +"@expo/config@6.0.9": + version "6.0.9" + resolved "https://registry.yarnpkg.com/@expo/config/-/config-6.0.9.tgz#d2f700e067581f7fb088c4e811b38351ac57e151" + integrity sha512-UJs8b5SSU9dl4VrX+MiSJcSwUVt7u6oUfNQDJ6VIWu03lDkNKtrk64GeSmUqHKsFd6iFXaMxtvkTBVmWWM6NaA== dependencies: "@babel/code-frame" "~7.10.4" - "@expo/config-plugins" "4.0.7" + "@expo/config-plugins" "4.0.9" "@expo/config-types" "^43.0.1" - "@expo/json-file" "8.2.33" + "@expo/json-file" "8.2.34" getenv "^1.0.0" glob "7.1.6" require-from-string "^2.0.2" @@ -1491,6 +1491,15 @@ json5 "^1.0.1" write-file-atomic "^2.3.0" +"@expo/json-file@8.2.34": + version "8.2.34" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.34.tgz#2f24e90a677195f7a81e167115460eb2902c3130" + integrity sha512-ZxtBodAZGxdLtgKzmsC+8ViUxt1mhFW642Clu2OuG3f6PAyAFsU/SqEGag9wKFaD3x3Wt8VhL+3y5fMJmUFgPw== + dependencies: + "@babel/code-frame" "~7.10.4" + json5 "^1.0.1" + write-file-atomic "^2.3.0" + "@expo/metro-config@~0.1.84": version "0.1.84" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.1.84.tgz#ddcc7b4f1087c29f86bc9d916933d29bacd2c726" @@ -1528,6 +1537,15 @@ base64-js "^1.2.3" xmlbuilder "^14.0.0" +"@expo/plist@0.0.16": + version "0.0.16" + resolved "https://registry.yarnpkg.com/@expo/plist/-/plist-0.0.16.tgz#c7d294a774196cfa1d8caf89a75ba923f5d1d53c" + integrity sha512-yQMt2CTm2VNLiHv2/EqHYrHvfflI2mFJd+DZIQQy569hvpZle0CxMPGH1p2KatbrO8htxJNvwrlR/4TIwhQJ5w== + dependencies: + "@xmldom/xmldom" "~0.7.0" + base64-js "^1.2.3" + xmlbuilder "^14.0.0" + "@expo/prebuild-config@^3.0.6": version "3.0.6" resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-3.0.6.tgz#1c0a657e6d5496f3ac00a522d5a36f72165d025b" @@ -1644,10 +1662,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@react-native-async-storage/async-storage@1.15.11": - version "1.15.11" - resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.15.11.tgz#da625b906529076414c32fd337d813b565149858" - integrity sha512-l/I+PK+lh5M25QSdk44aX+UR63ian2d2CSx6WbydwU+RUZmKP7eOEPe+OeaTWgfOFSVtlEqEcP2AbW2YM7ukMA== +"@react-native-async-storage/async-storage@1.15.13": + version "1.15.13" + resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.15.13.tgz#58f1d524c6e38275dbbfc05162c8f090a4c478b6" + integrity sha512-OnbPmjiBOREiutFMG356w+eWiEL1WRCgXDH/o6+4S1cIkfl9SZFanxUBlGi4/Ny22KXcJHN0VtWy0gL8jqYYLg== dependencies: merge-options "^3.0.4" @@ -1802,10 +1820,10 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@react-native-community/netinfo@6.2.0": - version "6.2.0" - resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-6.2.0.tgz#8c9079cde509e2482c9953ebd1da24693ef039f3" - integrity sha512-oEGwqYlDN2Ofbhf7W6NncKijEiPjp+1PzguqTmECncsB3IIVt0mLAqZDyT2Bw3Njxeeh4MhGsKqB5kzaXpqcxw== +"@react-native-community/netinfo@7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-7.1.2.tgz#992d1d92e946d6fbfc5024207bff2af2ef8d5b76" + integrity sha512-QknIAs1rNUwkBotOHZb+uKZ12cHk/aBJjNaf/oGO9PnguEkHAXLKpHcbvw3ZTk/Dr5cCKxaEEIsgYxgSU1IBfQ== "@react-native-community/segmented-control@2.2.2": version "2.2.2" @@ -2150,10 +2168,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/lodash@4.14.176": - version "4.14.176" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.176.tgz#641150fc1cda36fbfa329de603bbb175d7ee20c0" - integrity sha512-xZmuPTa3rlZoIbtDUyJKZQimJV3bxCmzMIO2c9Pz9afyDro6kr7R79GwcB6mRhuoPmV2p1Vb66WOJH7F886WKQ== +"@types/lodash@4.14.177": + version "4.14.177" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.177.tgz#f70c0d19c30fab101cad46b52be60363c43c4578" + integrity sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw== "@types/node@*": version "16.11.4" @@ -2172,10 +2190,10 @@ dependencies: "@types/react" "*" -"@types/react-native@0.66.4": - version "0.66.4" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.66.4.tgz#075d9521de1ee53a4f3eff729133d897039c0d7f" - integrity sha512-Aby37oZ0S8LS4abOVWbBgChfHLZsx3skcj2QJU9ZHPhA1h6+yBbdBH2wJLxIUXfYT1Ejkwuv8n5u+/VxLzzcmA== +"@types/react-native@0.66.6": + version "0.66.6" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.66.6.tgz#08f5b93cca9a50b7d19f353ff2a1ebe1a7c24a79" + integrity sha512-VqC2wN5wNCXqL9/Fve/bI1C+Q8BJlkiF/JOs7Qfw5eeD//nk5Imw4KrB8UiZZ/TPMSXPWYiKvWHiiqgA99L69g== dependencies: "@types/react" "*" @@ -2205,10 +2223,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@17.0.34": - version "17.0.34" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.34.tgz#797b66d359b692e3f19991b6b07e4b0c706c0102" - integrity sha512-46FEGrMjc2+8XhHXILr+3+/sTe3OfzSPU9YGKILLrUYbQ1CLQC9Daqo1KzENGXAWwrFwiY0l4ZbF20gRvgpWTg== +"@types/react@17.0.37": + version "17.0.37" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.37.tgz#6884d0aa402605935c397ae689deed115caad959" + integrity sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2243,10 +2261,10 @@ dependencies: "@types/yargs-parser" "*" -"@welldone-software/why-did-you-render@6.2.1": - version "6.2.1" - resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.1.tgz#6a87926cc8386b748dc07341cf495caa5be1db28" - integrity sha512-eIVKeK6ueS3tuzCqMVTaaNrPYvb9cA8NHiNgLA7Op8SD4TiT31zqNjxmhzLEK+y3sBxcwr6YhsiQGX9EThrvaw== +"@welldone-software/why-did-you-render@6.2.3": + version "6.2.3" + resolved "https://registry.yarnpkg.com/@welldone-software/why-did-you-render/-/why-did-you-render-6.2.3.tgz#cdd5e27cf25b7e767c1c0b0e8808f67d3f6be833" + integrity sha512-FQgi90jvC9uw2aALlonJfqaWOvU5UUBBVvdAnS2iryXwCc4YJkKsPJY5Y/LzaND3OIyk8XGUn1vTRn6hcem28Q== dependencies: lodash "^4" @@ -6269,10 +6287,10 @@ react-freeze@^1.0.0: resolved "https://registry.yarnpkg.com/react-freeze/-/react-freeze-1.0.0.tgz#b21c65fe1783743007c8c9a2952b1c8879a77354" integrity sha512-yQaiOqDmoKqks56LN9MTgY06O0qQHgV4FUrikH357DydArSZHQhl0BJFqGKIZoTqi8JizF9Dxhuk1FIZD6qCaw== -react-i18next@11.14.2: - version "11.14.2" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.14.2.tgz#2ff28f6a0ddf06eaf79435ed6c70c441d709cf34" - integrity sha512-fmDhwNA0zDmSEL3BBT5qwNMvxrKu25oXDDAZyHprfB0AHZmWXfBmRLf8MX8i1iBd2I2C2vsA2D9wxYBIwzooEQ== +react-i18next@11.14.3: + version "11.14.3" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-11.14.3.tgz#b44b5c4d1aadac5211be011827a2830be60f2522" + integrity sha512-Hf2aanbKgYxPjG8ZdKr+PBz9sY6sxXuZWizxCYyJD2YzvJ0W9JTQcddVEjDaKyBoCyd3+5HTerdhc9ehFugc6g== dependencies: "@babel/runtime" "^7.14.5" html-parse-stringify "^3.0.1" @@ -6358,10 +6376,10 @@ react-native-pager-view@5.4.9: resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-5.4.9.tgz#c0d40847cfeda5a4e729b53271b0ee0fedff3eb5" integrity sha512-D6tzxpwMGdl6CXgtskGWhKRc5cJakCazESRGt7PkqnpyiH3N35ft1KmR82pCSQetAFlytFiToeu3a/dG5CELvA== -"react-native-reanimated@npm:react-native-reanimated-savv@2.2.6": - version "2.2.6" - resolved "https://registry.yarnpkg.com/react-native-reanimated-savv/-/react-native-reanimated-savv-2.2.6.tgz#138a0f593d572325a3375a4545348f083ec02fc4" - integrity sha512-fH1eT7xWOWGBBjq+NEMEWobE4meoQhqxIFi/HdPiuKBCYA0/vheAocCUMB35oHLpxFjq1w3qgdaiafXn2E4DDw== +react-native-reanimated@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-2.2.4.tgz#36c5d15028b0bd7d479fba5199117ac870c7a532" + integrity sha512-Nn648MfEEnTCEiWsl1YmfkojiLyV0NMY0EiRdDRbZNfJVfxBuyqhCxI/4Jd7aBi162qpgf8XK2mByYgvF4zLrQ== dependencies: "@babel/plugin-transform-object-assign" "^7.10.4" fbjs "^3.0.0" @@ -6436,10 +6454,10 @@ react-native@0.66.3: whatwg-fetch "^3.0.0" ws "^6.1.4" -react-query@3.32.3: - version "3.32.3" - resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.32.3.tgz#a15035d0bcd632fffc7044839469e685c2dbcfc9" - integrity sha512-RB/EOSdJkmuypDIARG/mVi2T41WZKz3tUh72HAUu1OA3VoFr2kG2OFZoO3ylMKjUYI4A9bSaD7wtYg4Nwb71gQ== +react-query@3.33.6: + version "3.33.6" + resolved "https://registry.yarnpkg.com/react-query/-/react-query-3.33.6.tgz#12be9c59efe3b63dd1ed74204ae37ad4a19c7d77" + integrity sha512-prOMxzd4Utyl1AsR5PKqEeDUpx91BwJH+bm9LaQ9YooS68joGzsIDdNCe7m/lHQZI73NOqGJBPV5rFCHHwJRwQ== dependencies: "@babel/runtime" "^7.5.5" broadcast-channel "^3.4.1" @@ -7330,10 +7348,10 @@ type-fest@^0.7.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -typescript@4.4.4: - version "4.4.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" - integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== +typescript@4.5.2: + version "4.5.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.2.tgz#8ac1fba9f52256fdb06fb89e4122fa6a346c2998" + integrity sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw== ua-parser-js@^0.7.19, ua-parser-js@^0.7.30: version "0.7.30"