From 71175ab593fe7ea0114bc60569282f97b35f26b1 Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Fri, 30 Apr 2021 15:56:52 +0200 Subject: [PATCH] Fix Compose view not picking up remote changed (#421) * chore(deps): update sn-textview & standard-notes-rn * fix: update compose view when receiving remote changes * chore(version): 3.6.8 * fix: set screenshot privacy on app launch Co-authored-by: Antonella Sgarlatta --- ios/Podfile.lock | 8 +- ios/StandardNotes.xcodeproj/project.pbxproj | 172 +++++++------------- package.json | 8 +- src/lib/application_state.ts | 6 +- src/screens/Compose/Compose.styled.ts | 1 + src/screens/Compose/Compose.tsx | 47 +++--- yarn.lock | 12 +- 7 files changed, 99 insertions(+), 155 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 9cf557d6..d72d98b6 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -291,9 +291,9 @@ PODS: - React - RNVectorIcons (7.1.0): - React - - sn-textview (1.0.0): + - sn-textview (1.0.1): - React-Core - - SNReactNative (1.0.0): + - SNReactNative (1.0.1): - React-Core - TrustKit (1.6.5) - Yoga (1.14.0) @@ -513,8 +513,8 @@ SPEC CHECKSUMS: RNSearchBar: 5ed8e13ba8a6c701fbd2afdfe4164493d24b2aee RNStoreReview: 62d6afd7c37db711a594bbffca6b0ea3a812b7a8 RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 - sn-textview: 43135d1feb6e97994b8475b6a1e6e3c902d6b189 - SNReactNative: 3fa6096f78bea7dbd329c897ee854f73666d20db + sn-textview: 0211237b3e0edeeb23aed2a9c47b78af35a81e95 + SNReactNative: b5e9e529c175c13f3a618e27c76cf3071213d5e1 TrustKit: 073855e3adecd317417bda4ac9e9ac54a2e3b9f2 Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6 diff --git a/ios/StandardNotes.xcodeproj/project.pbxproj b/ios/StandardNotes.xcodeproj/project.pbxproj index 8ad713d9..64ad6009 100644 --- a/ios/StandardNotes.xcodeproj/project.pbxproj +++ b/ios/StandardNotes.xcodeproj/project.pbxproj @@ -25,7 +25,7 @@ 83DCC09F24C0A21200D58E1B /* Red@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8343BD69244F211C0020E9F0 /* Red@2x.png */; }; 83DCC0A024C0A21200D58E1B /* Red@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8343BD68244F211C0020E9F0 /* Red@3x.png */; }; 83F9431824C1EBC5007014C8 /* Dev.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 83F9431724C1EBC5007014C8 /* Dev.xcassets */; }; - 9472713467B26799E9270592 /* Pods_StandardNotes.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 892691A10E7D83241BCA16C1 /* Pods_StandardNotes.framework */; }; + E64C3F934735F2B562CA753B /* libPods-StandardNotes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 55E6A0DCFF3BB9E4D6780121 /* libPods-StandardNotes.a */; }; F1AF40B6D465714940D457A3 /* libPods-StandardNotesDev.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 340672DE690D292C12CF8DF2 /* libPods-StandardNotesDev.a */; }; /* End PBXBuildFile section */ @@ -51,6 +51,7 @@ 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StandardNotes/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StandardNotes/main.m; sourceTree = ""; }; 340672DE690D292C12CF8DF2 /* libPods-StandardNotesDev.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StandardNotesDev.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 55E6A0DCFF3BB9E4D6780121 /* libPods-StandardNotes.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StandardNotes.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 810594E7EAEF139BFC2FDD3B /* Pods-StandardNotes.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StandardNotes.release.xcconfig"; path = "Target Support Files/Pods-StandardNotes/Pods-StandardNotes.release.xcconfig"; sourceTree = ""; }; 8343BD67244F211C0020E9F0 /* Red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Red.png; sourceTree = ""; }; 8343BD68244F211C0020E9F0 /* Red@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Red@3x.png"; sourceTree = ""; }; @@ -61,7 +62,6 @@ 83E99B1D24EC4EC5007B8F21 /* SN Dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SN Dev.entitlements"; sourceTree = ""; }; 83E99B1E24EC9953007B8F21 /* StandardNotes.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StandardNotes.entitlements; path = StandardNotes/StandardNotes.entitlements; sourceTree = ""; }; 83F9431724C1EBC5007014C8 /* Dev.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Dev.xcassets; sourceTree = ""; }; - 892691A10E7D83241BCA16C1 /* Pods_StandardNotes.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StandardNotes.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 91D5BC0CD8D03CC85FE2AAD4 /* Pods-StandardNotesDev.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StandardNotesDev.debug.xcconfig"; path = "Target Support Files/Pods-StandardNotesDev/Pods-StandardNotesDev.debug.xcconfig"; sourceTree = ""; }; A905072699998C893CF2B50C /* Pods-StandardNotes.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StandardNotes.debug.xcconfig"; path = "Target Support Files/Pods-StandardNotes/Pods-StandardNotes.debug.xcconfig"; sourceTree = ""; }; CB9B9DBF83F519AB6584F5FE /* Pods-StandardNotesDev.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StandardNotesDev.release.xcconfig"; path = "Target Support Files/Pods-StandardNotesDev/Pods-StandardNotesDev.release.xcconfig"; sourceTree = ""; }; @@ -81,7 +81,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9472713467B26799E9270592 /* Pods_StandardNotes.framework in Frameworks */, + E64C3F934735F2B562CA753B /* libPods-StandardNotes.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -138,7 +138,7 @@ ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED2971642150620600B7C4FE /* JavaScriptCore.framework */, 340672DE690D292C12CF8DF2 /* libPods-StandardNotesDev.a */, - 892691A10E7D83241BCA16C1 /* Pods_StandardNotes.framework */, + 55E6A0DCFF3BB9E4D6780121 /* libPods-StandardNotes.a */, ); name = Frameworks; sourceTree = ""; @@ -220,7 +220,7 @@ 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 94C763DAAEF98E4BE76E8F53 /* [CP] Embed Pods Frameworks */, + 70E3C42536F9E92E21197CF8 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -394,7 +394,7 @@ "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core-library/AccessibilityResources.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -421,148 +421,88 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StandardNotesDev/Pods-StandardNotesDev-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 83DCC09524C0A21200D58E1B /* Start Packager */ = { + 70E3C42536F9E92E21197CF8 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-StandardNotes/Pods-StandardNotes-resources.sh", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf", + "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", ); - name = "Start Packager"; - outputFileListPaths = ( - ); + name = "[CP] Copy Pods Resources"; outputPaths = ( + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StandardNotes/Pods-StandardNotes-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 83DCC0A124C0A21200D58E1B /* Bundle React Native code and images */ = { + 83DCC09524C0A21200D58E1B /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( ); - name = "Bundle React Native code and images"; + name = "Start Packager"; + outputFileListPaths = ( + ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; }; - 94C763DAAEF98E4BE76E8F53 /* [CP] Embed Pods Frameworks */ = { + 83DCC0A124C0A21200D58E1B /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-StandardNotes/Pods-StandardNotes-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/TrustKit-framework/TrustKit.framework", - "${BUILT_PRODUCTS_DIR}/BugsnagReactNative-framework/Bugsnag.framework", - "${BUILT_PRODUCTS_DIR}/DoubleConversion-framework/DoubleConversion.framework", - "${BUILT_PRODUCTS_DIR}/FBReactNativeSpec-framework/FBReactNativeSpec.framework", - "${BUILT_PRODUCTS_DIR}/Folly-framework/folly.framework", - "${BUILT_PRODUCTS_DIR}/RCTTypeSafety-framework/RCTTypeSafety.framework", - "${BUILT_PRODUCTS_DIR}/RNCAsyncStorage-framework/RNCAsyncStorage.framework", - "${BUILT_PRODUCTS_DIR}/RNCMaskedView-framework/RNCMaskedView.framework", - "${BUILT_PRODUCTS_DIR}/RNDefaultPreference-framework/RNDefaultPreference.framework", - "${BUILT_PRODUCTS_DIR}/RNFS-framework/RNFS.framework", - "${BUILT_PRODUCTS_DIR}/RNFileViewer-framework/RNFileViewer.framework", - "${BUILT_PRODUCTS_DIR}/RNGestureHandler-framework/RNGestureHandler.framework", - "${BUILT_PRODUCTS_DIR}/RNKeychain-framework/RNKeychain.framework", - "${BUILT_PRODUCTS_DIR}/RNPrivacySnapshot-framework/RNPrivacySnapshot.framework", - "${BUILT_PRODUCTS_DIR}/RNReanimated-framework/RNReanimated.framework", - "${BUILT_PRODUCTS_DIR}/RNScreens-framework/RNScreens.framework", - "${BUILT_PRODUCTS_DIR}/RNSearchBar-framework/RNSearchBar.framework", - "${BUILT_PRODUCTS_DIR}/RNStoreReview-framework/RNStoreReview.framework", - "${BUILT_PRODUCTS_DIR}/RNVectorIcons-framework/RNVectorIcons.framework", - "${BUILT_PRODUCTS_DIR}/React-Core-framework/React.framework", - "${BUILT_PRODUCTS_DIR}/React-CoreModules-framework/CoreModules.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTAnimation-framework/RCTAnimation.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTBlob-framework/RCTBlob.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTImage-framework/RCTImage.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTLinking-framework/RCTLinking.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTNetwork-framework/RCTNetwork.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTSettings-framework/RCTSettings.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTText-framework/RCTText.framework", - "${BUILT_PRODUCTS_DIR}/React-RCTVibration-framework/RCTVibration.framework", - "${BUILT_PRODUCTS_DIR}/React-cxxreact-framework/cxxreact.framework", - "${BUILT_PRODUCTS_DIR}/React-jsi-framework/jsi.framework", - "${BUILT_PRODUCTS_DIR}/React-jsiexecutor-framework/jsireact.framework", - "${BUILT_PRODUCTS_DIR}/React-jsinspector-framework/jsinspector.framework", - "${BUILT_PRODUCTS_DIR}/ReactCommon-framework/ReactCommon.framework", - "${BUILT_PRODUCTS_DIR}/ReactNativeAlternateIcons-framework/ReactNativeAlternateIcons.framework", - "${BUILT_PRODUCTS_DIR}/SNReactNative-framework/SNReactNative.framework", - "${BUILT_PRODUCTS_DIR}/Yoga-framework/yoga.framework", - "${BUILT_PRODUCTS_DIR}/glog-framework/glog.framework", - "${BUILT_PRODUCTS_DIR}/react-native-aes-framework/react_native_aes.framework", - "${BUILT_PRODUCTS_DIR}/react-native-fingerprint-scanner-framework/react_native_fingerprint_scanner.framework", - "${BUILT_PRODUCTS_DIR}/react-native-mail-framework/react_native_mail.framework", - "${BUILT_PRODUCTS_DIR}/react-native-safe-area-context-framework/react_native_safe_area_context.framework", - "${BUILT_PRODUCTS_DIR}/react-native-segmented-control-framework/react_native_segmented_control.framework", - "${BUILT_PRODUCTS_DIR}/react-native-sodium-framework/react_native_sodium.framework", - "${BUILT_PRODUCTS_DIR}/react-native-version-info-framework/react_native_version_info.framework", - "${BUILT_PRODUCTS_DIR}/react-native-webview-framework/react_native_webview.framework", - "${BUILT_PRODUCTS_DIR}/sn-textview-framework/sn_textview.framework", - ); - name = "[CP] Embed Pods Frameworks"; + ); + name = "Bundle React Native code and images"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TrustKit.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Bugsnag.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNCAsyncStorage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNCMaskedView.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNDefaultPreference.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFS.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFileViewer.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNGestureHandler.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNKeychain.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNPrivacySnapshot.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNReanimated.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNScreens.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNSearchBar.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNStoreReview.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNVectorIcons.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactCommon.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactNativeAlternateIcons.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SNReactNative.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_aes.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_fingerprint_scanner.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_mail.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_safe_area_context.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_segmented_control.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_sodium.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_version_info.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_webview.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sn_textview.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-StandardNotes/Pods-StandardNotes-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; }; E5E35654B81EF4E64AB5D97C /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/package.json b/package.json index 51710978..a7dd1aa5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "StandardNotes", - "version": "3.6.7", - "user-version": "3.6.7", + "version": "3.6.8", + "user-version": "3.6.8", "private": true, "license": "AGPL-3.0-or-later", "scripts": { @@ -55,8 +55,8 @@ "react-native-version-info": "^1.1.0", "react-native-webview": "^11.0.3", "react-navigation-header-buttons": "^6.0.2", - "sn-textview": "standardnotes/sn-textview#3b56f5c2c87c24370f00ee5a0cee0da9a9fc66c3", - "standard-notes-rn": "standardnotes/standard-notes-rn#996b016", + "sn-textview": "standardnotes/sn-textview#14cd6fded5c746569a9c6c365d2edc41913811bb", + "standard-notes-rn": "standardnotes/standard-notes-rn#d8e5c21b049dd4b97006688617736efbdb7dc4e7", "styled-components": "^5.2.1" }, "devDependencies": { diff --git a/src/lib/application_state.ts b/src/lib/application_state.ts index bc42dd27..ed9fd0c8 100644 --- a/src/lib/application_state.ts +++ b/src/lib/application_state.ts @@ -174,13 +174,13 @@ export class ApplicationState extends ApplicationService { ); await this.loadUnlockTiming(); - this.screenshotPrivacyEnabled = - (await this.getScreenshotPrivacyEnabled()) ?? true; - this.setAndroidScreenshotPrivacy(this.screenshotPrivacyEnabled); } async onAppLaunch() { MobileApplication.setPreviouslyLaunched(); + this.screenshotPrivacyEnabled = + (await this.getScreenshotPrivacyEnabled()) ?? true; + this.setAndroidScreenshotPrivacy(this.screenshotPrivacyEnabled); } /** diff --git a/src/screens/Compose/Compose.styled.ts b/src/screens/Compose/Compose.styled.ts index 8b6f1887..326bf85d 100644 --- a/src/screens/Compose/Compose.styled.ts +++ b/src/screens/Compose/Compose.styled.ts @@ -117,6 +117,7 @@ export const StyledTextView = React.memo( prevProps: ComponentProps ) => { if ( + newProps.value !== prevProps.value || newProps.selectionColor !== prevProps.selectionColor || newProps.handlesColor !== prevProps.handlesColor || newProps.autoFocus !== prevProps.autoFocus || diff --git a/src/screens/Compose/Compose.tsx b/src/screens/Compose/Compose.tsx index 6086e3d2..b1a3b9ee 100644 --- a/src/screens/Compose/Compose.tsx +++ b/src/screens/Compose/Compose.tsx @@ -41,7 +41,8 @@ const SAVE_TIMEOUT_DEBOUNCE = 250; const SAVE_TIMEOUT_NO_DEBOUNCE = 100; type State = { - title: string | undefined; + title: string; + text: string; saveError: boolean; editorComponent: SNComponent | undefined; webViewError: boolean; @@ -65,27 +66,30 @@ export class Compose extends React.Component<{}, State> { removeAppEventObserver?: () => void; removeComponentHandler?: () => void; - state: State = { - title: '', - editorComponent: undefined, - saveError: false, - webViewError: false, - loadingWebview: false, - }; + constructor( + props: {}, + context: React.ContextType + ) { + super(props); + this.context = context; + const initialEditor = context?.editorGroup.activeEditor; + this.state = { + title: initialEditor?.note?.title ?? '', + text: initialEditor?.note?.text ?? '', + editorComponent: undefined, + saveError: false, + webViewError: false, + loadingWebview: false, + }; + } componentDidMount() { - const initialEditor = this.context?.editorGroup.activeEditor; - - // eslint-disable-next-line react/no-did-mount-set-state - this.setState({ - title: initialEditor?.note?.safeTitle(), - }); - this.removeEditorNoteChangeObserver = this.editor?.addNoteChangeObserver( newNote => { this.setState( { title: newNote.title, + text: newNote.text, }, () => { this.reloadComponentEditorState(); @@ -102,11 +106,9 @@ export class Compose extends React.Component<{}, State> { if (isPayloadSourceRetrieved(source!)) { this.setState({ title: newNote.title, + text: newNote.text, }); } - if (!this.state.title) { - this.setState({ title: newNote.title }); - } if (newNote.lastSyncBegan || newNote.dirty) { if (newNote.lastSyncEnd) { @@ -399,14 +401,15 @@ export class Compose extends React.Component<{}, State> { ); }; - onContentChange = (newNoteText: string) => { + onContentChange = (text: string) => { + this.setState({ text }); if (Platform.OS === 'android' && this.note?.locked) { this.context?.alertService?.alert( 'This note is locked. Please unlock this note to make changes.' ); return; } - this.saveNote(false, true, false, false, newNoteText); + this.saveNote(false, true, false, false, text); }; render() { @@ -510,7 +513,7 @@ export class Compose extends React.Component<{}, State> { testID="noteContentField" ref={this.editorViewRef} autoFocus={false} - value={this.note?.text} + value={this.state.text} selectionColor={lighten( theme.stylekitInfoColor, 0.35 @@ -528,7 +531,7 @@ export class Compose extends React.Component<{}, State> { ref={this.editorViewRef} autoFocus={false} multiline - value={this.note?.text} + value={this.state.text} keyboardDismissMode={'interactive'} keyboardAppearance={themeService?.keyboardColorForActiveTheme()} selectionColor={lighten(theme.stylekitInfoColor)} diff --git a/yarn.lock b/yarn.lock index bb788fce..f92a37a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7657,9 +7657,9 @@ slide@^1.1.5: resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= -sn-textview@standardnotes/sn-textview#3b56f5c2c87c24370f00ee5a0cee0da9a9fc66c3: - version "1.0.0" - resolved "https://codeload.github.com/standardnotes/sn-textview/tar.gz/3b56f5c2c87c24370f00ee5a0cee0da9a9fc66c3" +sn-textview@standardnotes/sn-textview#14cd6fded5c746569a9c6c365d2edc41913811bb: + version "1.0.1" + resolved "https://codeload.github.com/standardnotes/sn-textview/tar.gz/14cd6fded5c746569a9c6c365d2edc41913811bb" snapdragon-node@^2.0.1: version "2.1.1" @@ -7824,9 +7824,9 @@ stacktrace-parser@^0.1.3: dependencies: type-fest "^0.7.1" -standard-notes-rn@standardnotes/standard-notes-rn#996b016: - version "1.0.0" - resolved "https://codeload.github.com/standardnotes/standard-notes-rn/tar.gz/996b016f5a63e0e36fb50a86f5ad41c0c072b41e" +standard-notes-rn@standardnotes/standard-notes-rn#d8e5c21b049dd4b97006688617736efbdb7dc4e7: + version "1.0.1" + resolved "https://codeload.github.com/standardnotes/standard-notes-rn/tar.gz/d8e5c21b049dd4b97006688617736efbdb7dc4e7" static-extend@^0.1.1: version "0.1.2"