From d583d120990e05dc5b0ef932cca4380e9b0d6cf0 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Sun, 11 Aug 2013 15:37:51 -0400 Subject: [PATCH] Option to turn off iCloud on corruption. [ADDED] Option to turn off iCloud when store is broken. --- MasterPassword/ObjC/iOS/MPiOSAppDelegate.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m index 6492dcc1..7a1e5147 100644 --- a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m +++ b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m @@ -681,15 +681,19 @@ self.handleCloudContentAlert.tappedButtonBlock = ^(UIAlertView *alert, NSInteger buttonIndex) { wSelf.fixCloudContentAlert = [PearlAlert showAlertWithTitle:@"Fix iCloud Now" message: @"This problem can be auto‑corrected by opening the app on another device where you recently made changes.\n" - @"You can correct the problem from this device anyway, but recent changes made on another device might get lost." + @"You can correct the problem from this device anyway, but recent changes made on another device might get lost.\n\n" + @"You can also turn iCloud off and go back to your local sites." viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock: ^(UIAlertView *alert_, NSInteger buttonIndex_) { if (buttonIndex_ == alert_.cancelButtonIndex) [wSelf showCloudContentAlert]; if (buttonIndex_ == [alert_ firstOtherButtonIndex]) [wSelf.storeManager rebuildCloudContentFromCloudStoreOrLocalStore:YES]; + if (buttonIndex_ == [alert_ firstOtherButtonIndex] + 1) + wSelf.storeManager.cloudEnabled = NO; } - cancelTitle:[PearlStrings get].commonButtonBack otherTitles:@"Fix Anyway", nil]; + cancelTitle:[PearlStrings get].commonButtonBack otherTitles:@"Fix Anyway", + @"Turn Off", nil]; }; }