From 4564620671517a5d68d3ccf2e948e17fd6dc1b92 Mon Sep 17 00:00:00 2001 From: manuroe Date: Tue, 7 Mar 2017 14:46:48 +0100 Subject: [PATCH] e2e: Upload one-time keys on /sync rather than a timer Call [deviceList refreshOutdatedDeviceLists] after making announcement. -> Do it on the right thread --- MatrixSDK/Crypto/MXCrypto.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MatrixSDK/Crypto/MXCrypto.m b/MatrixSDK/Crypto/MXCrypto.m index d986e49acb..c3e29947f9 100644 --- a/MatrixSDK/Crypto/MXCrypto.m +++ b/MatrixSDK/Crypto/MXCrypto.m @@ -231,13 +231,13 @@ - (void)start:(void (^)())success // Once keys are uploaded, announce ourselves MXHTTPOperation *operation2 = [self makeAnnoucement:roomsByUser success:^{ - dispatch_async(dispatch_get_main_queue(), ^{ - startOperation = nil; - // Make sure we are refreshing devices lists right instead - // of waiting for the next /sync that may occur in 30s. - [_deviceList refreshOutdatedDeviceLists]; + // Make sure we are refreshing devices lists right instead + // of waiting for the next /sync that may occur in 30s. + [_deviceList refreshOutdatedDeviceLists]; + dispatch_async(dispatch_get_main_queue(), ^{ + startOperation = nil; success(); });