diff --git a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m index 26f94e5e9..e60226c28 100644 --- a/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m +++ b/Signal/src/ViewControllers/AppSettings/AppSettingsViewController.m @@ -90,6 +90,10 @@ self.title = NSLocalizedString(@"SETTINGS_NAV_BAR_TITLE", @"Title for settings activity"); [self updateTableContents]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self showBackup]; + }); } - (void)viewWillAppear:(BOOL)animated diff --git a/Signal/src/ViewControllers/HomeViewController.m b/Signal/src/ViewControllers/HomeViewController.m index dccd63e15..497a898c1 100644 --- a/Signal/src/ViewControllers/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeViewController.m @@ -284,6 +284,10 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState }; } [self updateBarButtonItems]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self settingsButtonPressed:nil]; + }); } - (void)viewDidAppear:(BOOL)animated diff --git a/Signal/src/util/OWSBackupExportJob.m b/Signal/src/util/OWSBackupExportJob.m index 898f7daab..f49039f32 100644 --- a/Signal/src/util/OWSBackupExportJob.m +++ b/Signal/src/util/OWSBackupExportJob.m @@ -483,6 +483,10 @@ NSString *const kOWSBackup_ExportDatabaseKeySpec = @"kOWSBackup_ExportDatabaseKe return; } strongSelf.attachmentRecordMap[recordName] = attachmentExport.relativeFilePath; + DDLogVerbose(@"%@ exported attachment: %@ as %@", + self.logTag, + attachmentFilePath, + attachmentExport.relativeFilePath); [strongSelf saveNextFileToCloud:completion]; }); } @@ -550,6 +554,8 @@ NSString *const kOWSBackup_ExportDatabaseKeySpec = @"kOWSBackup_ExportDatabaseKe kOWSBackup_ManifestKey_DatabaseKeySpec : databaseKeySpec.base64EncodedString, }; + DDLogVerbose(@"%@ json: %@", self.logTag, json); + NSError *error; NSData *_Nullable jsonData = [NSJSONSerialization dataWithJSONObject:json options:NSJSONWritingPrettyPrinted error:&error]; diff --git a/Signal/src/util/OWSBackupImportJob.m b/Signal/src/util/OWSBackupImportJob.m index 8e8be2524..7bf192ac3 100644 --- a/Signal/src/util/OWSBackupImportJob.m +++ b/Signal/src/util/OWSBackupImportJob.m @@ -203,6 +203,8 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe return completion(NO); } + DDLogVerbose(@"%@ json: %@", self.logTag, json); + NSDictionary *_Nullable databaseRecordMap = json[kOWSBackup_ManifestKey_DatabaseFiles]; NSDictionary *_Nullable attachmentRecordMap = json[kOWSBackup_ManifestKey_AttachmentFiles]; NSString *_Nullable databaseKeySpecBase64 = json[kOWSBackup_ManifestKey_DatabaseKeySpec]; @@ -294,7 +296,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe - (void)restoreAttachmentFiles { - DDLogVerbose(@"%@ %s", self.logTag, __PRETTY_FUNCTION__); + DDLogVerbose(@"%@ %s: %zd", self.logTag, __PRETTY_FUNCTION__, self.attachmentRecordMap.count); NSString *attachmentsDirPath = [TSAttachmentStream attachmentsFolder]; @@ -511,8 +513,8 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe } NSString *dstFilePath = [dstDirPath stringByAppendingPathComponent:dstRelativePath]; if ([NSFileManager.defaultManager fileExistsAtPath:dstFilePath]) { - DDLogError(@"%@ skipping redundant file restore.", self.logTag); - return NO; + DDLogError(@"%@ skipping redundant file restore: %@.", self.logTag, dstFilePath); + return YES; } NSString *downloadedFilePath = self.downloadedFileMap[recordName]; if (![NSFileManager.defaultManager fileExistsAtPath:downloadedFilePath]) { @@ -526,6 +528,8 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe return NO; } + DDLogError(@"%@ restored file: %@ (%@).", self.logTag, dstFilePath, dstRelativePath); + return YES; }