fix: remember active tag on launch (#410)

* chore: run pod install

* fix: use 'application?'

* fix: restore selected tag on launch
This commit is contained in:
Baptiste Grob
2021-04-23 15:43:15 +02:00
committed by GitHub
parent c9c6db0ab2
commit cbd2d1702a
9 changed files with 133 additions and 165 deletions

View File

@@ -299,9 +299,9 @@ PODS:
- React-Core
- SSZipArchive (= 2.2.3)
- sn-textview (1.0.0):
- React-Core
- React
- SNReactNative (1.0.0):
- React-Core
- React
- SSZipArchive (2.2.3)
- TrustKit (1.6.5)
- Yoga (1.14.0)
@@ -526,8 +526,8 @@ SPEC CHECKSUMS:
RNStoreReview: 62d6afd7c37db711a594bbffca6b0ea3a812b7a8
RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59
RNZipArchive: 3dd2de5b7f590d79e83270508b78870bf5a54f36
sn-textview: 43135d1feb6e97994b8475b6a1e6e3c902d6b189
SNReactNative: 3fa6096f78bea7dbd329c897ee854f73666d20db
sn-textview: f478ee79531da2c7b129c4ea3b20c665e75e1f4b
SNReactNative: c47c4fd6d310eea152cc52e23f4fd306491efee3
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
TrustKit: 073855e3adecd317417bda4ac9e9ac54a2e3b9f2
Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6

View File

@@ -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 */; };
EC7C2A984CBC86DBCA44D3AF /* libPods-StandardNotes.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D9673D75406FE1C6B945FF8 /* 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 = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StandardNotes/main.m; sourceTree = "<group>"; };
340672DE690D292C12CF8DF2 /* libPods-StandardNotesDev.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-StandardNotesDev.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4D9673D75406FE1C6B945FF8 /* 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 = "<group>"; };
8343BD67244F211C0020E9F0 /* Red.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Red.png; sourceTree = "<group>"; };
8343BD68244F211C0020E9F0 /* Red@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Red@3x.png"; sourceTree = "<group>"; };
@@ -61,7 +62,6 @@
83E99B1D24EC4EC5007B8F21 /* SN Dev.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SN Dev.entitlements"; sourceTree = "<group>"; };
83E99B1E24EC9953007B8F21 /* StandardNotes.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StandardNotes.entitlements; path = StandardNotes/StandardNotes.entitlements; sourceTree = "<group>"; };
83F9431724C1EBC5007014C8 /* Dev.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Dev.xcassets; sourceTree = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
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 = "<group>"; };
@@ -81,7 +81,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9472713467B26799E9270592 /* Pods_StandardNotes.framework in Frameworks */,
EC7C2A984CBC86DBCA44D3AF /* 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 */,
4D9673D75406FE1C6B945FF8 /* libPods-StandardNotes.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -220,7 +220,7 @@
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
94C763DAAEF98E4BE76E8F53 /* [CP] Embed Pods Frameworks */,
1DCF3C40742945E814110BC4 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -349,6 +349,56 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
1DCF3C40742945E814110BC4 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
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 = "[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 = "\"${PODS_ROOT}/Target Support Files/Pods-StandardNotes/Pods-StandardNotes-resources.sh\"\n";
showEnvVarsInLog = 0;
};
22CF5F27C67390DA618B03A3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -394,7 +444,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 = (
@@ -454,116 +504,6 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
94C763DAAEF98E4BE76E8F53 /* [CP] Embed Pods Frameworks */ = {
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";
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;
};
E5E35654B81EF4E64AB5D97C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

View File

@@ -138,7 +138,7 @@ export class MobileApplication extends SNApplication {
return this.MobileServices.backupsService;
}
public getPrefsService() {
public getLocalPreferences() {
return this.MobileServices.prefsService;
}

View File

@@ -102,6 +102,7 @@ export class ApplicationState extends ApplicationService {
keyboardDidHideListener?: EmitterSubscription;
keyboardHeight?: number;
appEventObersever: any;
selectedTagRestored = false;
selectedTag: SNTag = this.application.getSmartTags()[0];
userPreferences?: SNUserPrefs;
tabletMode: boolean = false;
@@ -152,24 +153,33 @@ export class ApplicationState extends ApplicationService {
this.keyboardDidHideListener = undefined;
}
restoreSelectedTag() {
if (this.selectedTagRestored) {
return;
}
const savedTagUuid: string | undefined = this.prefService.getValue(
PrefKey.SelectedTagUuid,
undefined
);
if (isNullOrUndefined(savedTagUuid)) {
this.selectedTagRestored = true;
return;
}
const savedTag =
(this.application.findItem(savedTagUuid) as SNTag) ||
this.application.getSmartTags().find(tag => tag.uuid === savedTagUuid);
if (savedTag) {
this.setSelectedTag(savedTag, false);
this.selectedTagRestored = true;
}
}
async onAppStart() {
this.removePreferencesLoadedListener = this.prefService.addPreferencesLoadedObserver(
() => {
this.notifyOfStateChange(AppStateType.PreferencesChanged);
const savedTagUuid: string | undefined = this.prefService.getValue(
PrefKey.SelectedTagUuid,
undefined
);
const savedTag = !isNullOrUndefined(savedTagUuid)
? (this.application.findItem(savedTagUuid) as SNTag) ||
this.application
.getSmartTags()
.find(tag => tag.uuid === savedTagUuid)
: undefined;
if (savedTag) {
this.setSelectedTag(savedTag, false);
}
}
);
@@ -386,11 +396,21 @@ export class ApplicationState extends ApplicationService {
private handleApplicationEvents() {
this.appEventObersever = this.application.addEventObserver(
async eventName => {
if (eventName === ApplicationEvent.Started) {
this.locked = true;
} else if (eventName === ApplicationEvent.Launched) {
this.locked = false;
this.notifyLockStateObservers(LockStateType.Unlocked);
switch (eventName) {
case ApplicationEvent.LocalDataIncrementalLoad:
case ApplicationEvent.LocalDataLoaded: {
this.restoreSelectedTag();
break;
}
case ApplicationEvent.Started: {
this.locked = true;
break;
}
case ApplicationEvent.Launched: {
this.locked = false;
this.notifyLockStateObservers(LockStateType.Unlocked);
break;
}
}
}
);
@@ -399,8 +419,8 @@ export class ApplicationState extends ApplicationService {
/**
* Set selected @SNTag
*/
public setSelectedTag(tag: SNTag, saveSelection: boolean) {
if (this.selectedTag === tag) {
public setSelectedTag(tag: SNTag, saveSelection: boolean = true) {
if (this.selectedTag.uuid === tag.uuid) {
return;
}
const previousTag = this.selectedTag;
@@ -408,7 +428,7 @@ export class ApplicationState extends ApplicationService {
if (saveSelection) {
this.application
.getPrefsService()
.getLocalPreferences()
.setUserPrefValue(PrefKey.SelectedTagUuid, tag.uuid);
}
@@ -681,7 +701,7 @@ export class ApplicationState extends ApplicationService {
}
private get prefService() {
return this.application.getPrefsService();
return this.application.getLocalPreferences();
}
public getEnvironment() {

View File

@@ -92,7 +92,7 @@ export const ComponentView = ({
useEffect(() => {
const warnUnsupportedEditors = async () => {
const doNotShowAgainUnsupportedEditors = application
?.getPrefsService()
?.getLocalPreferences()
.getValue(PrefKey.DoNotShowAgainUnsupportedEditors, false);
if (!doNotShowAgainUnsupportedEditors) {
const confirmed = await application?.alertService?.confirm(
@@ -104,7 +104,7 @@ export const ComponentView = ({
);
if (confirmed) {
application
?.getPrefsService()
?.getLocalPreferences()
.setUserPrefValue(PrefKey.DoNotShowAgainUnsupportedEditors, true);
}
}

View File

@@ -60,18 +60,20 @@ export const Notes = React.memo(
// State
const [sortBy, setSortBy] = useState<CollectionSort>(() =>
application!
.getPrefsService()
.getLocalPreferences()
.getValue(PrefKey.SortNotesBy, CollectionSort.CreatedAt)
);
const [sortReverse, setSortReverse] = useState<boolean>(() =>
application!.getPrefsService().getValue(PrefKey.SortNotesReverse, false)
application!
.getLocalPreferences()
.getValue(PrefKey.SortNotesReverse, false)
);
const [hideDates, setHideDates] = useState<boolean>(() =>
application!.getPrefsService().getValue(PrefKey.NotesHideDate, false)
application!.getLocalPreferences().getValue(PrefKey.NotesHideDate, false)
);
const [hidePreviews, setHidePreviews] = useState<boolean>(() =>
application!
.getPrefsService()
.getLocalPreferences()
.getValue(PrefKey.NotesHideNotePreview, false)
);
const [notes, setNotes] = useState<SNNote[]>([]);
@@ -485,18 +487,18 @@ export const Notes = React.memo(
const reloadPreferences = useCallback(async () => {
const newSortBy = application
?.getPrefsService()
?.getLocalPreferences()
.getValue(PrefKey.SortNotesBy, CollectionSort.CreatedAt);
let displayOptionsChanged = false;
const newSortReverse = application
?.getPrefsService()
?.getLocalPreferences()
.getValue(PrefKey.SortNotesReverse, false);
const newHidePreview = application!
.getPrefsService()
.getLocalPreferences()
.getValue(PrefKey.NotesHideNotePreview, false);
const newHideDate = application!
.getPrefsService()
.getLocalPreferences()
.getValue(PrefKey.NotesHideDate, false);
if (sortBy !== newSortBy) {

View File

@@ -29,7 +29,9 @@ export const OptionsSection = ({ title, encryptionAvailable }: Props) => {
// State
const [exporting, setExporting] = useState(false);
const [lastExportDate, setLastExportDate] = useState<Date | undefined>(() =>
application?.getPrefsService().getValue(PrefKey.LastExportDate, undefined)
application
?.getLocalPreferences()
.getValue(PrefKey.LastExportDate, undefined)
);
const lastExportData = useMemo(() => {
@@ -93,7 +95,7 @@ export const OptionsSection = ({ title, encryptionAvailable }: Props) => {
const exportDate = new Date();
setLastExportDate(exportDate);
application
?.getPrefsService()
?.getLocalPreferences()
.setUserPrefValue(PrefKey.LastExportDate, exportDate);
}
setExporting(false);

View File

@@ -13,17 +13,19 @@ export const PreferencesSection = () => {
// State
const [sortBy, setSortBy] = useState<CollectionSort>(() =>
application!
.getPrefsService()
.getLocalPreferences()
.getValue(PrefKey.SortNotesBy, CollectionSort.CreatedAt)
);
const [sortReverse, setSortReverse] = useState<boolean>(() =>
application!.getPrefsService().getValue(PrefKey.SortNotesReverse, false)
application!.getLocalPreferences().getValue(PrefKey.SortNotesReverse, false)
);
const [hideDates, setHideDates] = useState<boolean>(() =>
application!.getPrefsService().getValue(PrefKey.NotesHideDate, false)
application!.getLocalPreferences().getValue(PrefKey.NotesHideDate, false)
);
const [hidePreviews, setHidePreviews] = useState<boolean>(() =>
application!.getPrefsService().getValue(PrefKey.NotesHideNotePreview, false)
application!
.getLocalPreferences()
.getValue(PrefKey.NotesHideNotePreview, false)
);
const sortOptions = useMemo(() => {
@@ -36,24 +38,26 @@ export const PreferencesSection = () => {
const toggleReverseSort = () => {
application
?.getPrefsService()
?.getLocalPreferences()
.setUserPrefValue(PrefKey.SortNotesReverse, !sortReverse);
setSortReverse(value => !value);
};
const changeSortOption = (key: CollectionSort) => {
application?.getPrefsService().setUserPrefValue(PrefKey.SortNotesBy, key);
application
?.getLocalPreferences()
.setUserPrefValue(PrefKey.SortNotesBy, key);
setSortBy(key);
};
const toggleNotesPreviewHidden = () => {
application
?.getPrefsService()
?.getLocalPreferences()
.setUserPrefValue(PrefKey.NotesHideNotePreview, !hidePreviews);
setHidePreviews(value => !value);
};
const toggleNotesDateHidden = () => {
application
?.getPrefsService()
?.getLocalPreferences()
.setUserPrefValue(PrefKey.NotesHideDate, !hideDates);
setHideDates(value => !value);
};

View File

@@ -245,7 +245,7 @@ export const MainSideMenu = React.memo(({ drawerRef }: Props) => {
mutator.conflictOf = undefined;
});
}
application!.getAppState().setSelectedTag(tag, true);
application?.getAppState().setSelectedTag(tag, true);
drawerRef?.closeDrawer();
};