Fix attachments sometimes not downloading

This commit is contained in:
Niels Andriesse 2021-01-11 15:05:43 +11:00
parent c094d1e7fb
commit 766bfcbd0c

View file

@ -389,10 +389,6 @@ static NSTimeInterval launchStartedAt;
// sent before the app exited should be marked as failures.
[[[OWSFailedMessagesJob alloc] initWithPrimaryStorage:self.primaryStorage] run];
[[[OWSFailedAttachmentDownloadsJob alloc] initWithPrimaryStorage:self.primaryStorage] run];
if (CurrentAppContext().isMainApp) {
[SNJobQueue.shared resumePendingJobs];
}
});
}
}); // end dispatchOnce for first time we become active
@ -433,6 +429,10 @@ static NSTimeInterval launchStartedAt;
[OWSSyncPushTokensJob runWithAccountManager:AppEnvironment.shared.accountManager
preferences:Environment.shared.preferences];
}
if (CurrentAppContext().isMainApp) {
[SNJobQueue.shared resumePendingJobs];
}
});
}
}