diff --git a/ios/Podfile b/ios/Podfile index c5491ac6..4d27b3b8 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -24,17 +24,5 @@ target 'tooot' do post_install do |installer| react_native_post_install(installer) - - # Workaround `Cycle inside FBReactNativeSpec` error for react-native 0.64 - # Reference: https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-812543933 - installer.pods_project.targets.each do |target| - if (target.name&.eql?('FBReactNativeSpec')) - target.build_phases.each do |build_phase| - if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs')) - target.build_phases.move(build_phase, 0) - end - end - end - end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 362c1893..55547f3c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -3,7 +3,7 @@ PODS: - DoubleConversion (1.1.6) - EXApplication (4.0.0): - ExpoModulesCore - - EXAV (10.1.2): + - EXAV (10.1.3): - ExpoModulesCore - EXConstants (12.1.3): - ExpoModulesCore @@ -48,23 +48,23 @@ PODS: - ExpoModulesCore - EXPermissions (13.0.3): - ExpoModulesCore - - Expo (43.0.0): + - Expo (43.0.3): - ExpoModulesCore - ExpoModulesCore (0.4.4): - React-Core - - EXRandom (12.0.0): + - EXRandom (12.0.1): - React-Core - EXScreenCapture (4.0.3): - ExpoModulesCore - EXSecureStore (11.0.3): - ExpoModulesCore - - EXSplashScreen (0.13.4): + - EXSplashScreen (0.13.5): - ExpoModulesCore - React-Core - EXStoreReview (5.0.3): - ExpoModulesCore - EXStructuredHeaders (2.0.0) - - EXUpdates (0.10.5): + - EXUpdates (0.10.15): - EXManifests - ExpoModulesCore - EXStructuredHeaders @@ -75,14 +75,14 @@ PODS: - ExpoModulesCore - EXWebBrowser (10.0.3): - ExpoModulesCore - - FBLazyVector (0.66.1) - - FBReactNativeSpec (0.66.1): + - FBLazyVector (0.66.3) + - FBReactNativeSpec (0.66.3): - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.66.1) - - RCTTypeSafety (= 0.66.1) - - React-Core (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) + - RCTRequired (= 0.66.3) + - RCTTypeSafety (= 0.66.3) + - React-Core (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) - Firebase/Core (7.7.0): - Firebase/CoreOnly - FirebaseAnalytics (= 7.7.0) @@ -123,25 +123,27 @@ PODS: - GoogleUtilities/Environment (~> 7.2) - nanopb (~> 2.30907.0) - PromisesObjC (~> 1.2) - - GoogleUtilities/AppDelegateSwizzler (7.5.2): + - GoogleUtilities/AppDelegateSwizzler (7.6.0): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - - GoogleUtilities/Environment (7.5.2): + - GoogleUtilities/Environment (7.6.0): - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.5.2): + - GoogleUtilities/Logger (7.6.0): - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (7.5.2): + - GoogleUtilities/MethodSwizzler (7.6.0): - GoogleUtilities/Logger - - GoogleUtilities/Network (7.5.2): + - GoogleUtilities/Network (7.6.0): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.5.2)" - - GoogleUtilities/Reachability (7.5.2): + - "GoogleUtilities/NSData+zlib (7.6.0)" + - GoogleUtilities/Reachability (7.6.0): - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (7.5.2): + - GoogleUtilities/UserDefaults (7.6.0): - GoogleUtilities/Logger + - hermes-engine (0.9.0) + - libevent (2.1.12) - libwebp (1.2.1): - libwebp/demux (= 1.2.1) - libwebp/mux (= 1.2.1) @@ -168,192 +170,209 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog - - RCTRequired (0.66.1) - - RCTTypeSafety (0.66.1): - - FBLazyVector (= 0.66.1) + - RCT-Folly/Futures (2021.06.28.00-v2): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - libevent + - RCTRequired (0.66.3) + - RCTTypeSafety (0.66.3): + - FBLazyVector (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.66.1) - - React-Core (= 0.66.1) - - React (0.66.1): - - React-Core (= 0.66.1) - - React-Core/DevSupport (= 0.66.1) - - React-Core/RCTWebSocket (= 0.66.1) - - React-RCTActionSheet (= 0.66.1) - - React-RCTAnimation (= 0.66.1) - - React-RCTBlob (= 0.66.1) - - React-RCTImage (= 0.66.1) - - React-RCTLinking (= 0.66.1) - - React-RCTNetwork (= 0.66.1) - - React-RCTSettings (= 0.66.1) - - React-RCTText (= 0.66.1) - - React-RCTVibration (= 0.66.1) - - React-callinvoker (0.66.1) - - React-Core (0.66.1): + - RCTRequired (= 0.66.3) + - React-Core (= 0.66.3) + - React (0.66.3): + - React-Core (= 0.66.3) + - React-Core/DevSupport (= 0.66.3) + - React-Core/RCTWebSocket (= 0.66.3) + - React-RCTActionSheet (= 0.66.3) + - React-RCTAnimation (= 0.66.3) + - React-RCTBlob (= 0.66.3) + - React-RCTImage (= 0.66.3) + - React-RCTLinking (= 0.66.3) + - React-RCTNetwork (= 0.66.3) + - React-RCTSettings (= 0.66.3) + - React-RCTText (= 0.66.3) + - React-RCTVibration (= 0.66.3) + - React-callinvoker (0.66.3) + - React-Core (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.1) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-Core/Default (= 0.66.3) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/CoreModulesHeaders (0.66.1): + - React-Core/CoreModulesHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/Default (0.66.1): + - React-Core/Default (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/DevSupport (0.66.1): + - React-Core/DevSupport (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.1) - - React-Core/RCTWebSocket (= 0.66.1) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-jsinspector (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-Core/Default (= 0.66.3) + - React-Core/RCTWebSocket (= 0.66.3) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-jsinspector (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTActionSheetHeaders (0.66.1): + - React-Core/RCTActionSheetHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTAnimationHeaders (0.66.1): + - React-Core/RCTAnimationHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTBlobHeaders (0.66.1): + - React-Core/RCTBlobHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTImageHeaders (0.66.1): + - React-Core/RCTImageHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTLinkingHeaders (0.66.1): + - React-Core/RCTLinkingHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTNetworkHeaders (0.66.1): + - React-Core/RCTNetworkHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTSettingsHeaders (0.66.1): + - React-Core/RCTSettingsHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTTextHeaders (0.66.1): + - React-Core/RCTTextHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTVibrationHeaders (0.66.1): + - React-Core/RCTVibrationHeaders (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-Core/RCTWebSocket (0.66.1): + - React-Core/RCTWebSocket (0.66.3): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.66.1) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsiexecutor (= 0.66.1) - - React-perflogger (= 0.66.1) + - React-Core/Default (= 0.66.3) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-perflogger (= 0.66.3) - Yoga - - React-CoreModules (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - React-CoreModules (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.1) - - React-Core/CoreModulesHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - React-RCTImage (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-cxxreact (0.66.1): + - RCTTypeSafety (= 0.66.3) + - React-Core/CoreModulesHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - React-RCTImage (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-cxxreact (0.66.3): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.66.1) - - React-jsi (= 0.66.1) - - React-jsinspector (= 0.66.1) - - React-logger (= 0.66.1) - - React-perflogger (= 0.66.1) - - React-runtimeexecutor (= 0.66.1) - - React-jsi (0.66.1): + - React-callinvoker (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsinspector (= 0.66.3) + - React-logger (= 0.66.3) + - React-perflogger (= 0.66.3) + - React-runtimeexecutor (= 0.66.3) + - React-hermes (0.66.3): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2021.06.28.00-v2) + - RCT-Folly/Futures (= 2021.06.28.00-v2) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-jsiexecutor (= 0.66.3) + - React-jsinspector (= 0.66.3) + - React-perflogger (= 0.66.3) + - React-jsi (0.66.3): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsi/Default (= 0.66.1) - - React-jsi/Default (0.66.1): + - React-jsi/Default (= 0.66.3) + - React-jsi/Default (0.66.3): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsiexecutor (0.66.1): + - React-jsiexecutor (0.66.3): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-perflogger (= 0.66.1) - - React-jsinspector (0.66.1) - - React-logger (0.66.1): + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-perflogger (= 0.66.3) + - React-jsinspector (0.66.3) + - React-logger (0.66.3): - glog - react-native-blur (0.8.0): - React @@ -361,80 +380,80 @@ PODS: - React-Core - react-native-cameraroll (4.1.2): - React-Core - - react-native-netinfo (6.0.4): + - react-native-netinfo (6.2.0): - React-Core - - react-native-pager-view (5.4.7): + - react-native-pager-view (5.4.9): - React-Core - react-native-safe-area-context (3.3.2): - React-Core - react-native-segmented-control (2.2.2): - React-Core - - React-perflogger (0.66.1) - - React-RCTActionSheet (0.66.1): - - React-Core/RCTActionSheetHeaders (= 0.66.1) - - React-RCTAnimation (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - React-perflogger (0.66.3) + - React-RCTActionSheet (0.66.3): + - React-Core/RCTActionSheetHeaders (= 0.66.3) + - React-RCTAnimation (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.1) - - React-Core/RCTAnimationHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTBlob (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - RCTTypeSafety (= 0.66.3) + - React-Core/RCTAnimationHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTBlob (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/RCTBlobHeaders (= 0.66.1) - - React-Core/RCTWebSocket (= 0.66.1) - - React-jsi (= 0.66.1) - - React-RCTNetwork (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTImage (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - React-Core/RCTBlobHeaders (= 0.66.3) + - React-Core/RCTWebSocket (= 0.66.3) + - React-jsi (= 0.66.3) + - React-RCTNetwork (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTImage (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.1) - - React-Core/RCTImageHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - React-RCTNetwork (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTLinking (0.66.1): - - FBReactNativeSpec (= 0.66.1) - - React-Core/RCTLinkingHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTNetwork (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - RCTTypeSafety (= 0.66.3) + - React-Core/RCTImageHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - React-RCTNetwork (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTLinking (0.66.3): + - FBReactNativeSpec (= 0.66.3) + - React-Core/RCTLinkingHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTNetwork (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.1) - - React-Core/RCTNetworkHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTSettings (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - RCTTypeSafety (= 0.66.3) + - React-Core/RCTNetworkHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTSettings (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.66.1) - - React-Core/RCTSettingsHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-RCTText (0.66.1): - - React-Core/RCTTextHeaders (= 0.66.1) - - React-RCTVibration (0.66.1): - - FBReactNativeSpec (= 0.66.1) + - RCTTypeSafety (= 0.66.3) + - React-Core/RCTSettingsHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-RCTText (0.66.3): + - React-Core/RCTTextHeaders (= 0.66.3) + - React-RCTVibration (0.66.3): + - FBReactNativeSpec (= 0.66.3) - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/RCTVibrationHeaders (= 0.66.1) - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (= 0.66.1) - - React-runtimeexecutor (0.66.1): - - React-jsi (= 0.66.1) - - ReactCommon/turbomodule/core (0.66.1): + - React-Core/RCTVibrationHeaders (= 0.66.3) + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (= 0.66.3) + - React-runtimeexecutor (0.66.3): + - React-jsi (= 0.66.3) + - ReactCommon/turbomodule/core (0.66.3): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.66.1) - - React-Core (= 0.66.1) - - React-cxxreact (= 0.66.1) - - React-jsi (= 0.66.1) - - React-logger (= 0.66.1) - - React-perflogger (= 0.66.1) - - RNCAsyncStorage (1.15.9): + - React-callinvoker (= 0.66.3) + - React-Core (= 0.66.3) + - React-cxxreact (= 0.66.3) + - React-jsi (= 0.66.3) + - React-logger (= 0.66.3) + - React-perflogger (= 0.66.3) + - RNCAsyncStorage (1.15.11): - React-Core - RNFastImage (8.5.11): - React-Core @@ -442,7 +461,7 @@ PODS: - SDWebImageWebPCoder (~> 0.8.4) - RNGestureHandler (1.10.3): - React-Core - - RNReanimated (2.3.0-beta.3): + - RNReanimated (2.2.6): - DoubleConversion - FBLazyVector - FBReactNativeSpec @@ -471,12 +490,12 @@ PODS: - React-RCTVibration - ReactCommon/turbomodule/core - Yoga - - RNScreens (3.8.0): + - RNScreens (3.9.0): - React-Core - React-RCTImage - - RNSentry (3.1.1): + - RNSentry (3.2.3): - React-Core - - Sentry (= 7.3.0) + - Sentry (= 7.5.1) - RNSVG (12.1.1): - React - SDWebImage (5.11.1): @@ -485,9 +504,9 @@ PODS: - SDWebImageWebPCoder (0.8.4): - libwebp (~> 1.0) - SDWebImage/Core (~> 5.10) - - Sentry (7.3.0): - - Sentry/Core (= 7.3.0) - - Sentry/Core (7.3.0) + - Sentry (7.5.1): + - Sentry/Core (= 7.5.1) + - Sentry/Core (7.5.1) - UMTaskManagerInterface (7.0.3): - ExpoModulesCore - Yoga (1.14.0) @@ -531,6 +550,8 @@ DEPENDENCIES: - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (~> 0.9.0) + - libevent (~> 2.1.12) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) @@ -541,6 +562,7 @@ DEPENDENCIES: - React-Core/RCTWebSocket (from `../node_modules/react-native/`) - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) @@ -585,6 +607,8 @@ SPEC REPOS: - GoogleAppMeasurement - GoogleDataTransport - GoogleUtilities + - hermes-engine + - libevent - libwebp - nanopb - PromisesObjC @@ -685,6 +709,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/React/CoreModules" React-cxxreact: :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" React-jsi: :path: "../node_modules/react-native/ReactCommon/jsi" React-jsiexecutor: @@ -754,7 +780,7 @@ SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 EXApplication: 0e15240e4d125b62f1cae48759ffbbd32b9286a6 - EXAV: d6d4a3337edbcdfdbfd6d3e5942dabdfcf3e5d0a + EXAV: 8adf9a1c0161144d77e96149a1e5a5f9358be290 EXConstants: 6d585d93723b18d7a8c283591a335609e3bc153e EXCrypto: 7bcda085ffaccdaf3a252c20774a08be4277b8e3 EXDevice: d19bbef7ab8ee4669ef1d6424c538f8d8fe7d6e9 @@ -774,20 +800,20 @@ SPEC CHECKSUMS: EXMediaLibrary: 2a684cca228d6605a72f9995d3e7b8af2a05246c EXNotifications: 4a2beb5a2a7292ba64165413811b7c495bcb1297 EXPermissions: 7696f4c16e89981f84c04d96327f7e1e592373c0 - Expo: f3357f1f9796d0b4d396d0be84c49933671db4ad + Expo: 5316c3ecdc34eb0cad340d01dc8beec97c7e879e ExpoModulesCore: 47b403a33ad73770c49d7559615b3ea121a36116 - EXRandom: 9ed4600d410cf2fe58d22b3121865624065a16e9 + EXRandom: 64c954ae24619b8d0c18ff46aa96401e98efc977 EXScreenCapture: aa7292f963ccfde7aed4ba6bb6e822e95ef5153e EXSecureStore: 919bf7c28472862020d2cd7b59b69aae160b5d40 - EXSplashScreen: 68390ddb65a5def66ce8cf46a1e14a9b33cdac70 + EXSplashScreen: 57f329dbf25c5c12800feed79068a056453dc772 EXStoreReview: ba32e9ebdab47176fe263db022982e4b8a580c28 EXStructuredHeaders: 873e7f329c2f6279c1b1e0229df59c9861560b53 - EXUpdates: 964b7932e8fb332403170cb7cd438f48f6d6c64e + EXUpdates: 061b67c33f0e7f8fd335bbb48697c4a4fc8a5157 EXUpdatesInterface: e1c01b4f5ec76bd1d6cc714938f9edf5ef6379b9 EXVideoThumbnails: 3bdcce697449df005fcc348153e2f854ed462984 EXWebBrowser: ecb70d9e6edb279d9b10b2bbc9ad4320fcdc4060 - FBLazyVector: 500821d196c3d1bd10e7e828bc93ce075234080f - FBReactNativeSpec: 74c869e2cffa2ffec685cd1bac6788c021da6005 + FBLazyVector: de148e8310b8b878db304ceea2fec13f2c02e3a0 + FBReactNativeSpec: 6192956c9e346013d5f1809ba049af720b11c6a4 Firebase: cd2ab85eec8170dc260186159f21072ecb679ad5 FirebaseAnalytics: f3f8f75de34fe04141a69bb1c4bd7e24a80178e1 FirebaseCore: ac35d680a0bf32319a59966a1478e0741536b97b @@ -797,54 +823,57 @@ SPEC CHECKSUMS: glog: 5337263514dd6f09803962437687240c5dc39aa4 GoogleAppMeasurement: 0c3b134b2c0a90c4c24833873894bfe0e42a0384 GoogleDataTransport: 8b0e733ea77c9218778e5a9e34ba9508b8328939 - GoogleUtilities: 8de2a97a17e15b6b98e38e8770e2d129a57c0040 + GoogleUtilities: 684ee790a24f73ebb2d1d966e9711c203f2a4237 + hermes-engine: bf7577d12ac6ccf53ab8b5af3c6ccf0dd8458c5c + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc nanopb: 59221d7f958fb711001e6a449489542d92ae113e PromisesObjC: 3113f7f76903778cf4a0586bd1ab89329a0b7b97 RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 - RCTRequired: 3cc065b52aa18db729268b9bd78a2feffb4d0f91 - RCTTypeSafety: 3c4fc37d5dea452d2ef17324db5504ec2f05083a - React: 4a00720816c52a213424442954acb7e4b724804a - React-callinvoker: 911fc6570538f3bb5c61edf9dc907c1beb4355bf - React-Core: e134d3a5d7b2a1a731589be776e20dbb14868f27 - React-CoreModules: 2f8588b2aa47e7fef27125c8eaaabda963b3ac62 - React-cxxreact: 8f1382538cad0cc8b8eafca6d66268828e353bea - React-jsi: 9fe1854d2c0486216acebd5db3c38b4ccb23ca0b - React-jsiexecutor: db2f6e22a534d466fc0e34e622df47d9d20bab2f - React-jsinspector: 8c0517dee5e8c70cd6c3066f20213ff7ce54f176 - React-logger: bfddd3418dc1d45b77b822958f3e31422e2c179b + RCTRequired: 59d2b744d8c2bf2d9bc7032a9f654809adcf7d50 + RCTTypeSafety: d0aaf7ccae5c70a4aaa3a5c3e9e0db97efae760e + React: fbe655dd1d12c052299b61abdc576720098d80fc + React-callinvoker: a535746608d9bc8b1dea7095ed4d8d3d7aae9a05 + React-Core: 008d2638c4f80b189c8e170ff2d241027ec517fd + React-CoreModules: 91c9a03f4e1b74494c087d9c9a29e89a3145c228 + React-cxxreact: 9c462fb6d59f865855e2dee2097c7d87b3d2de49 + React-hermes: 79103a3907b81b7eeb394b37612b991076d27472 + React-jsi: 4de8b8d70ba4ed841eb9b772bdb719f176387e21 + React-jsiexecutor: 433a691aee158533a6a6ee9c86cb4a1684fa2853 + React-jsinspector: d9c8eb0b53f0da206fed56612b289fec84991157 + React-logger: e522e76fa3e9ec3e7d7115b49485cc065cf4ae06 react-native-blur: cad4d93b364f91e7b7931b3fa935455487e5c33c react-native-blurhash: d978f8017ed091d9e1179775fe7bac14297e6e1e react-native-cameraroll: 2957f2bce63ae896a848fbe0d5352c1bd4d20866 - react-native-netinfo: 1c7676413ab265759c7b3da205efab163f5366ef - react-native-pager-view: 741e7606ee2f6e399fc7da777f5519454a4b38c5 + react-native-netinfo: de0d4343f8d5ec9b92653b17a0ef47091317986a + react-native-pager-view: 3ee7d4c7697fb3ef788346e834a60cca97ed8540 react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057 react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 - React-perflogger: fcac6090a80e3d967791b4c7f1b1a017f9d4a398 - React-RCTActionSheet: caf5913d9f9e605f5467206cf9d1caa6d47d7ad6 - React-RCTAnimation: 6539e3bf594f6a529cd861985ba6548286ae1ead - React-RCTBlob: 6e2e999d28b15fd03ed533f164ce33e0fcde571a - React-RCTImage: c6bbb10eedb6b840c4474f2108b864173b83de15 - React-RCTLinking: 8fda9bb8fdb104e78110a903a9a77754318c7d11 - React-RCTNetwork: 2b26daad93830501cf14aab03eac04e304f942d3 - React-RCTSettings: 89c0dcee7adb706c749383596f57c1e882a27843 - React-RCTText: 71734fce8e6cb854daeb4a5eec182c303ea58473 - React-RCTVibration: 6600b5eed7c0fda4a433fa1198d1cb2690151791 - React-runtimeexecutor: 33a949a51bec5f8a3c9e8d8092deb259600d761e - ReactCommon: 620442811dc6f707b4bf5e3b27d4f19c12d5a821 - RNCAsyncStorage: 26f25150da507524a7815f2ada06ca0967f65633 + React-perflogger: 73732888d37d4f5065198727b167846743232882 + React-RCTActionSheet: 96c6d774fa89b1f7c59fc460adc3245ba2d7fd79 + React-RCTAnimation: 8940cfd3a8640bd6f6372150dbdb83a79bcbae6c + React-RCTBlob: e80de5fdf952a4f226a00fc54f3db526809f92f7 + React-RCTImage: f990d6b272c7e89ff864caf0bccfb620ab3ca5d0 + React-RCTLinking: 2280ed0d5ffb78954b484b90228d597b5f941c5f + React-RCTNetwork: 1359fa853c216616e711b810dcb8682a6a8e7564 + React-RCTSettings: 84958860aaa3639f0249e751ea7702c62eb67188 + React-RCTText: 196cf06b8cb6229d8c6dd9fc9057bdf97db5d3fb + React-RCTVibration: 50cfe7049167cfc7e83ac5542c6fff0c76791a9b + React-runtimeexecutor: bbbdb3d8fcf327c6e2249ee71b6ef1764b7dc266 + ReactCommon: 9bac022ab71596f2b0fde1268272543184c63971 + RNCAsyncStorage: eb05c0284dd6b50b32f92fad55e2a41e03358c43 RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7 RNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211 - RNReanimated: ee76770869ffe2a76fcd612d4204cc7787169593 - RNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c - RNSentry: 49abc89b0190b4c8afe0fa5d065f98e36cb53233 + RNReanimated: 20aca2bc881924158c504343755b00bc3cb08025 + RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3 + RNSentry: 97bc62fa65b7d663daee16fbf9771470852217cf RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815 - Sentry: 9a4e621430e2dae4477d791f2f7e905720b6efbf + Sentry: 0718c3ad7a08e1107599610795adaf08864102f3 UMTaskManagerInterface: 5654c50e68af11b19b9d05452bacf23d19b3f30f - Yoga: 2b4a01651f42a32f82e6cef3830a3ba48088237f + Yoga: 32a18c0e845e185f4a2a66ec76e1fd1f958f22fa -PODFILE CHECKSUM: 21aa9efa62652ab53cbfd5094a7b9eb0d8706ade +PODFILE CHECKSUM: 9bf9d386bac4ff98f76fc93f120c9922660384b5 COCOAPODS: 1.11.2 diff --git a/ios/tooot.xcodeproj/project.pbxproj b/ios/tooot.xcodeproj/project.pbxproj index 36ed6068..30e5e8a6 100644 --- a/ios/tooot.xcodeproj/project.pbxproj +++ b/ios/tooot.xcodeproj/project.pbxproj @@ -167,6 +167,7 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */, + 49D30A53634620EF2A5C6692 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -265,6 +266,24 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 49D30A53634620EF2A5C6692 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-tooot/Pods-tooot-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-tooot/Pods-tooot-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -443,7 +462,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -505,7 +524,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 "; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 i386"; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/package.json b/package.json index df40f0e0..aa7a87b9 100644 --- a/package.json +++ b/package.json @@ -26,22 +26,22 @@ "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.9", + "@react-native-async-storage/async-storage": "1.15.11", "@react-native-community/blur": "3.6.0", "@react-native-community/cameraroll": "4.1.2", - "@react-native-community/netinfo": "6.0.4", + "@react-native-community/netinfo": "6.2.0", "@react-native-community/segmented-control": "2.2.2", "@react-navigation/bottom-tabs": "6.0.9", "@react-navigation/native": "6.0.6", "@react-navigation/native-stack": "6.2.5", "@react-navigation/stack": "6.0.11", "@reduxjs/toolkit": "1.6.2", - "@sentry/react-native": "3.1.1", - "@sharcoux/slider": "5.5.2", - "axios": "0.23.0", - "expo": "43.0.0", + "@sentry/react-native": "3.2.3", + "@sharcoux/slider": "5.6.1", + "axios": "0.24.0", + "expo": "43.0.3", "expo-auth-session": "3.4.2", - "expo-av": "10.1.2", + "expo-av": "10.1.3", "expo-constants": "^12.1.3", "expo-crypto": "10.0.3", "expo-device": "4.0.3", @@ -55,13 +55,13 @@ "expo-media-library": "^13.0.3", "expo-notifications": "0.13.3", "expo-permissions": "13.0.3", - "expo-random": "12.0.0", + "expo-random": "12.0.1", "expo-screen-capture": "4.0.3", "expo-secure-store": "11.0.3", - "expo-splash-screen": "0.13.4", + "expo-splash-screen": "0.13.5", "expo-status-bar": "1.1.0", "expo-store-review": "5.0.3", - "expo-updates": "0.10.5", + "expo-updates": "0.10.15", "expo-video-thumbnails": "6.0.3", "expo-web-browser": "10.0.3", "i18next": "20.6.1", @@ -69,8 +69,8 @@ "lodash": "4.17.21", "react": "17.0.2", "react-dom": "17.0.2", - "react-i18next": "11.12.0", - "react-native": "0.66.1", + "react-i18next": "11.14.2", + "react-native": "0.66.3", "react-native-animated-spinkit": "1.5.2", "react-native-blurhash": "1.1.5", "react-native-fast-image": "8.5.11", @@ -78,15 +78,15 @@ "react-native-flash-message": "0.2.0", "react-native-gesture-handler": "1.10.3", "react-native-htmlview": "0.16.0", - "react-native-pager-view": "5.4.7", + "react-native-pager-view": "5.4.9", "react-native-reanimated": "npm:react-native-reanimated-savv@2.2.6", "react-native-safe-area-context": "3.3.2", - "react-native-screens": "3.8.0", + "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.28.0", - "react-redux": "7.2.5", + "react-query": "3.32.3", + "react-redux": "7.2.6", "react-timeago": "6.2.1", "redux-persist": "6.0.0", "rn-placeholder": "3.0.3", @@ -95,14 +95,14 @@ "valid-url": "1.0.9" }, "devDependencies": { - "@babel/core": "7.15.8", - "@babel/plugin-proposal-optional-chaining": "7.14.5", - "@babel/preset-typescript": "7.15.0", - "@expo/config": "6.0.6", + "@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.31", - "@types/react-dom": "17.0.10", - "@types/react-native": "0.66.0", + "@types/react": "17.0.34", + "@types/react-dom": "17.0.11", + "@types/react-native": "0.66.4", "@types/react-redux": "7.1.20", "@types/react-timeago": "4.1.3", "@types/valid-url": "1.0.3", diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index c0154742..de1742b7 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -299,8 +299,28 @@ declare namespace Mastodon { // Others thumbnail?: string contact_account?: Account - - // Custom + configuration?: { + statuses: { + max_characters: number + max_media_attachments: number + characters_reserved_per_url: number + } + media_attachments: { + supported_mime_types: string[] + image_size_limit: number + image_matrix_limit: number + video_size_limit: number + video_frame_rate_limit: number + video_matrix_limit: number + } + polls: { + max_options: number + max_characters_per_option: number + min_expiration: number + max_expiration: number + } + } + // Custom - to be deprecated in v4 max_toot_chars?: number } diff --git a/src/Screens.tsx b/src/Screens.tsx index b5fc58f5..8397144b 100644 --- a/src/Screens.tsx +++ b/src/Screens.tsx @@ -15,6 +15,7 @@ import pushUseReceive from '@utils/push/useReceive' import pushUseRespond from '@utils/push/useRespond' import { updatePreviousTab } from '@utils/slices/contextsSlice' import { updateAccountPreferences } from '@utils/slices/instances/updateAccountPreferences' +import { updateConfiguration } from '@utils/slices/instances/updateConfiguration' import { updateFilters } from '@utils/slices/instances/updateFilters' import { getInstanceActive, getInstances } from '@utils/slices/instancesSlice' import { useTheme } from '@utils/styles/ThemeManager' @@ -108,6 +109,7 @@ const Screens: React.FC = ({ localCorrupt }) => { // Lazily update users's preferences, for e.g. composing default visibility useEffect(() => { if (instanceActive !== -1) { + dispatch(updateConfiguration()) dispatch(updateFilters()) dispatch(updateAccountPreferences()) } diff --git a/src/components/Instance/Auth.tsx b/src/components/Instance/Auth.tsx index 765d20ef..8d0e9e49 100644 --- a/src/components/Instance/Auth.tsx +++ b/src/components/Instance/Auth.tsx @@ -22,9 +22,8 @@ const InstanceAuth = React.memo( useProxy: false }) - const navigation = useNavigation< - TabMeStackNavigationProp<'Tab-Me-Root' | 'Tab-Me-Switch'> - >() + const navigation = + useNavigation>() const queryClient = useQueryClient() const dispatch = useDispatch() @@ -70,7 +69,6 @@ const InstanceAuth = React.memo( domain: instanceDomain, token: accessToken, instance, - max_toot_chars: instance.max_toot_chars, appData }) ) diff --git a/src/components/mediaSelector.ts b/src/components/mediaSelector.ts index c3c73b18..478bf3ec 100644 --- a/src/components/mediaSelector.ts +++ b/src/components/mediaSelector.ts @@ -11,7 +11,7 @@ export interface Props { resize?: { width?: number; height?: number } // Resize mode contain showActionSheetWithOptions: ( options: ActionSheetOptions, - callback: (i: number) => void + callback: (i?: number | undefined) => void | Promise ) => void } @@ -57,9 +57,8 @@ const mediaSelector = async ({ }, async buttonIndex => { if (buttonIndex === 0) { - const { - status - } = await ImagePicker.requestMediaLibraryPermissionsAsync() + const { status } = + await ImagePicker.requestMediaLibraryPermissionsAsync() if (status !== 'granted') { Alert.alert( i18next.t('componentMediaSelector:library.alert.title'), diff --git a/src/screens/Compose.tsx b/src/screens/Compose.tsx index ba7ef1a7..c1cd1fed 100644 --- a/src/screens/Compose.tsx +++ b/src/screens/Compose.tsx @@ -9,7 +9,7 @@ import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { updateStoreReview } from '@utils/slices/contextsSlice' import { getInstanceAccount, - getInstanceMaxTootChar, + getInstanceConfigurationStatusMaxChars, removeInstanceDraft, updateInstanceDraft } from '@utils/slices/instancesSlice' @@ -103,7 +103,10 @@ const ScreenCompose: React.FC> = ({ initialReducerState ) - const maxTootChars = useSelector(getInstanceMaxTootChar, () => true) + const maxTootChars = useSelector( + getInstanceConfigurationStatusMaxChars, + () => true + ) const totalTextCount = (composeState.spoiler.active ? composeState.spoiler.count : 0) + composeState.text.count diff --git a/src/screens/Compose/Root.tsx b/src/screens/Compose/Root.tsx index 742b5f62..2d4d72d6 100644 --- a/src/screens/Compose/Root.tsx +++ b/src/screens/Compose/Root.tsx @@ -29,6 +29,8 @@ import ComposeDrafts from './Root/Drafts' import FastImage from 'react-native-fast-image' import { useAccessibility } from '@utils/accessibility/AccessibilityManager' import { ComposeState } from './utils/types' +import { useSelector } from 'react-redux' +import { getInstanceConfigurationStatusCharsURL } from '@utils/slices/instancesSlice' const prefetchEmojis = ( sortedEmojis: NonNullable, @@ -54,11 +56,18 @@ const prefetchEmojis = ( } catch {} } +export let instanceConfigurationStatusCharsURL = 23 + const ComposeRoot = React.memo( () => { const { reduceMotionEnabled } = useAccessibility() const { theme } = useTheme() + instanceConfigurationStatusCharsURL = useSelector( + getInstanceConfigurationStatusCharsURL, + () => true + ) + const accessibleRefDrafts = useRef(null) const accessibleRefAttachments = useRef(null) const accessibleRefEmojis = useRef(null) diff --git a/src/screens/Compose/Root/Actions.tsx b/src/screens/Compose/Root/Actions.tsx index 5a46245f..c3c8c178 100644 --- a/src/screens/Compose/Root/Actions.tsx +++ b/src/screens/Compose/Root/Actions.tsx @@ -1,12 +1,14 @@ import analytics from '@components/analytics' import Icon from '@components/Icon' import { useActionSheet } from '@expo/react-native-action-sheet' +import { getInstanceConfigurationStatusMaxAttachments } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import layoutAnimation from '@utils/styles/layoutAnimation' import { useTheme } from '@utils/styles/ThemeManager' import React, { useCallback, useContext, useMemo } from 'react' import { useTranslation } from 'react-i18next' import { Pressable, StyleSheet, View } from 'react-native' +import { useSelector } from 'react-redux' import ComposeContext from '../utils/createContext' import addAttachment from './Footer/addAttachment' @@ -15,6 +17,10 @@ const ComposeActions: React.FC = () => { const { composeState, composeDispatch } = useContext(ComposeContext) const { t } = useTranslation('screenCompose') const { theme } = useTheme() + const instanceConfigurationStatusMaxAttachments = useSelector( + getInstanceConfigurationStatusMaxAttachments, + () => true + ) const attachmentColor = useMemo(() => { if (composeState.poll.active) return theme.disabled @@ -28,7 +34,10 @@ const ComposeActions: React.FC = () => { const attachmentOnPress = useCallback(async () => { if (composeState.poll.active) return - if (composeState.attachments.uploads.length < 4) { + if ( + composeState.attachments.uploads.length < + instanceConfigurationStatusMaxAttachments + ) { analytics('compose_actions_attachment_press', { count: composeState.attachments.uploads.length }) diff --git a/src/screens/Compose/Root/Footer/Poll.tsx b/src/screens/Compose/Root/Footer/Poll.tsx index f3c8f89d..363ddb4d 100644 --- a/src/screens/Compose/Root/Footer/Poll.tsx +++ b/src/screens/Compose/Root/Footer/Poll.tsx @@ -3,11 +3,13 @@ import Button from '@components/Button' import Icon from '@components/Icon' import { MenuRow } from '@components/Menu' import { useActionSheet } from '@expo/react-native-action-sheet' +import { getInstanceConfigurationPoll } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useContext, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { StyleSheet, TextInput, View } from 'react-native' +import { StyleSheet, Text, TextInput, View } from 'react-native' +import { useSelector } from 'react-redux' import ComposeContext from '../../utils/createContext' const ComposePoll: React.FC = () => { @@ -21,6 +23,16 @@ const ComposePoll: React.FC = () => { const { t } = useTranslation('screenCompose') const { mode, theme } = useTheme() + const instanceConfigurationPoll = useSelector( + getInstanceConfigurationPoll, + () => true + ) + const MAX_OPTIONS = instanceConfigurationPoll.max_options + const MAX_CHARS_PER_OPTION = + instanceConfigurationPoll.max_characters_per_option + const MIN_EXPIRATION = instanceConfigurationPoll.min_expiration + const MAX_EXPIRATION = instanceConfigurationPoll.max_expiration + const [firstRender, setFirstRender] = useState(true) useEffect(() => { setFirstRender(false) @@ -67,7 +79,7 @@ const ComposePoll: React.FC = () => { : t('content.root.footer.poll.option.placeholder.single') } placeholderTextColor={theme.disabled} - maxLength={50} + maxLength={MAX_CHARS_PER_OPTION} // @ts-ignore value={options[i]} onChangeText={e => @@ -82,37 +94,38 @@ const ComposePoll: React.FC = () => { })} - -