Merge branch 'charlesmchen/moreBackupFeatureFlag'
This commit is contained in:
commit
222e07c5bd
@ -79,8 +79,6 @@ NSError *OWSBackupErrorWithDescription(NSString *description);
|
||||
|
||||
- (AnyPromise *)ensureCloudKitAccess;
|
||||
|
||||
- (AnyPromise *)checkCanExportBackup;
|
||||
|
||||
- (void)checkCanImportBackup:(OWSBackupBoolBlock)success failure:(OWSBackupErrorBlock)failure;
|
||||
|
||||
// TODO: After a successful import, we should enable backup and
|
||||
|
||||
@ -433,11 +433,6 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
|
||||
}];
|
||||
}
|
||||
|
||||
- (AnyPromise *)checkCanExportBackup
|
||||
{
|
||||
return [self ensureCloudKitAccess];
|
||||
}
|
||||
|
||||
- (AnyPromise *)ensureCloudKitAccess
|
||||
{
|
||||
OWSAssertIsOnMainThread();
|
||||
@ -473,6 +468,13 @@ NSError *OWSBackupErrorWithDescription(NSString *description)
|
||||
|
||||
OWSLogInfo(@"");
|
||||
|
||||
if (!OWSBackup.isFeatureEnabled) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
success(NO);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
void (^failWithUnexpectedError)(void) = ^{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSError *error =
|
||||
|
||||
Loading…
Reference in New Issue
Block a user