From 766bfcbd0c8340a4993be9cbdd301751d5166ceb Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 11 Jan 2021 15:05:43 +1100 Subject: [PATCH] Fix attachments sometimes not downloading --- Session/Signal/AppDelegate.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Session/Signal/AppDelegate.m b/Session/Signal/AppDelegate.m index 577441897..4f497391e 100644 --- a/Session/Signal/AppDelegate.m +++ b/Session/Signal/AppDelegate.m @@ -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]; + } }); } }