Fix incremental backup exports.

pull/1/head
Matthew Chen 6 years ago
parent fe8259bf0c
commit 9a123d8ce9

@ -77,6 +77,10 @@ NS_ASSUME_NONNULL_BEGIN
actionBlock:^{
[DebugUIBackup logBackupMetadataCache];
}]];
[items addObject:[OWSTableItem itemWithTitle:@"Lazy Restore Attachments"
actionBlock:^{
[AppEnvironment.shared.backupLazyRestore runIfNecessary];
}]];
return [OWSTableSection sectionWithTitle:self.name items:items];
}

@ -175,7 +175,7 @@ NSString *const kOWSBackup_ImportDatabaseKeySpec = @"kOWSBackup_ImportDatabaseKe
})
.then(^{
// Kick off lazy restore on main thread.
[self.backupLazyRestore runIfNecessary];
[self.backupLazyRestore clearCompleteAndRunIfNecessary];
[self.profileManager fetchLocalUsersProfile];

@ -53,6 +53,15 @@ public class BackupLazyRestore: NSObject {
private let backgroundQueue = DispatchQueue.global(qos: .background)
@objc
public func clearCompleteAndRunIfNecessary() {
AssertIsOnMainThread()
isComplete = false
runIfNecessary()
}
@objc
public func runIfNecessary() {
AssertIsOnMainThread()

Loading…
Cancel
Save