From fa620cffbf6cc0bc9aeb54d03121a192615f244a Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Mon, 3 Jun 2019 09:15:52 -0500 Subject: [PATCH] SFJS updates --- ios/StandardNotes.xcodeproj/project.pbxproj | 16 +++++++--------- ios/StandardNotes/Info.plist | 2 +- src/lib/sfjs/migrationManager.js | 8 ++++---- src/screens/KeyRecovery.js | 2 +- src/screens/Notes/NoteCell.js | 9 ++++++++- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ios/StandardNotes.xcodeproj/project.pbxproj b/ios/StandardNotes.xcodeproj/project.pbxproj index 22d94de3..edd9a5f7 100644 --- a/ios/StandardNotes.xcodeproj/project.pbxproj +++ b/ios/StandardNotes.xcodeproj/project.pbxproj @@ -1080,7 +1080,8 @@ TestTargetID = 13B07F861A680F5B00A75B9A; }; 13B07F861A680F5B00A75B9A = { - ProvisioningStyle = Manual; + DevelopmentTeam = HKF9BXSN95; + ProvisioningStyle = Automatic; SystemCapabilities = { com.apple.DataProtection = { enabled = 1; @@ -1836,11 +1837,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = Blue; CODE_SIGN_ENTITLEMENTS = StandardNotes/StandardNotes.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = HKF9BXSN95; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", @@ -1877,11 +1877,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = Blue; CODE_SIGN_ENTITLEMENTS = StandardNotes/StandardNotes.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 69F43LABD5; + DEVELOPMENT_TEAM = HKF9BXSN95; HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../node_modules/react-native-keychain/RNKeychainManager", @@ -1907,7 +1905,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.standardnotes.standardnotes; PRODUCT_NAME = StandardNotes; - PROVISIONING_PROFILE_SPECIFIER = "StandardNotes-AppStore"; + PROVISIONING_PROFILE_SPECIFIER = ""; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/ios/StandardNotes/Info.plist b/ios/StandardNotes/Info.plist index d47ed8b4..3f7e1266 100644 --- a/ios/StandardNotes/Info.plist +++ b/ios/StandardNotes/Info.plist @@ -71,7 +71,7 @@ CFBundleSignature ???? CFBundleVersion - 1 + 2 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/src/lib/sfjs/migrationManager.js b/src/lib/sfjs/migrationManager.js index db819246..b9593669 100644 --- a/src/lib/sfjs/migrationManager.js +++ b/src/lib/sfjs/migrationManager.js @@ -52,7 +52,7 @@ export default class MigrationManager extends SFMigrationManager { let options = { contentType: contentType }; // The user is signed in - Sync.get().stateless_downloadAllItems(options).then((items) => { + Sync.get().stateless_downloadAllItems(options).then(async (items) => { let matchingPrivs = items.filter((candidate) => { return candidate.content_type == contentType; }); @@ -61,7 +61,7 @@ export default class MigrationManager extends SFMigrationManager { return; } - let mapped = ModelManager.get().mapResponseItemsToLocalModelsOmittingFields( + let mapped = await ModelManager.get().mapResponseItemsToLocalModelsOmittingFields( matchingPrivs, null, SFModelManager.MappingSourceRemoteRetrieved); // Singleton manager usually resolves singletons on sync completion callback, // but since we're manually mapping, we have to make it manually resolve singletons @@ -84,7 +84,7 @@ export default class MigrationManager extends SFMigrationManager { let options = { contentType: contentType }; // The user is signed in - Sync.get().stateless_downloadAllItems(options).then((items) => { + Sync.get().stateless_downloadAllItems(options).then(async (items) => { let matchingTags = items.filter((candidate) => { return candidate.content_type == contentType; }); @@ -93,7 +93,7 @@ export default class MigrationManager extends SFMigrationManager { return; } - ModelManager.get().mapResponseItemsToLocalModelsOmittingFields( + await ModelManager.get().mapResponseItemsToLocalModelsOmittingFields( matchingTags, null, SFModelManager.MappingSourceRemoteRetrieved); }) } diff --git a/src/screens/KeyRecovery.js b/src/screens/KeyRecovery.js index 6e657826..3895ac1d 100644 --- a/src/screens/KeyRecovery.js +++ b/src/screens/KeyRecovery.js @@ -73,7 +73,7 @@ export default class KeyRecovery extends Abstract { let useKeys = async (confirm) => { let run = async () => { await KeysManager.get().persistOfflineKeys(keys); - ModelManager.get().mapResponseItemsToLocalModelsOmittingFields(this.items, null, SFModelManager.MappingSourceLocalRetrieved); + await ModelManager.get().mapResponseItemsToLocalModelsOmittingFields(this.items, null, SFModelManager.MappingSourceLocalRetrieved); await Sync.get().writeItemsToLocalStorage(this.items); this.dismiss(); } diff --git a/src/screens/Notes/NoteCell.js b/src/screens/Notes/NoteCell.js index ba48aeda..d17085c7 100644 --- a/src/screens/Notes/NoteCell.js +++ b/src/screens/Notes/NoteCell.js @@ -92,7 +92,7 @@ export default class NoteCell extends ThemedPureComponent { options.push(ActionSheetWrapper.BuildOption({text: "Move to Trash", key: ItemActionManager.TrashEvent, destructive: true, callback: callbackForAction})); } else { options.push(ActionSheetWrapper.BuildOption({text: "Restore Note", key: ItemActionManager.RestoreEvent, destructive: false, callback: callbackForAction})); - options.push(ActionSheetWrapper.BuildOption({text: "Delete Forever", key: ItemActionManager.DeleteEvent, destructive: true, callback: callbackForAction})); + options.push(ActionSheetWrapper.BuildOption({text: "Delete Permanently", key: ItemActionManager.DeleteEvent, destructive: true, callback: callbackForAction})); } sheet = new ActionSheetWrapper({ @@ -160,6 +160,13 @@ export default class NoteCell extends ThemedPureComponent { }) } + if(note.deleted) { + flags.push({ + text: "Deletion Pending Sync", + color: StyleKit.variables.stylekitDangerColor + }) + } + return flags; }