From 757f14c3389d2b1a73b76fb36c4c111d0fa91975 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 11 Jun 2020 17:26:13 +1000 Subject: [PATCH] Clean --- .../Loki/Protocol/Multi Device/MultiDeviceProtocol.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SignalServiceKit/src/Loki/Protocol/Multi Device/MultiDeviceProtocol.swift b/SignalServiceKit/src/Loki/Protocol/Multi Device/MultiDeviceProtocol.swift index e45c1f323..b052a7b0b 100644 --- a/SignalServiceKit/src/Loki/Protocol/Multi Device/MultiDeviceProtocol.swift +++ b/SignalServiceKit/src/Loki/Protocol/Multi Device/MultiDeviceProtocol.swift @@ -254,7 +254,7 @@ public final class MultiDeviceProtocol : NSObject { }) { return } - LokiFileServerAPI.getDeviceLinks(associatedWith: getUserHexEncodedPublicKey()).done(on: DispatchQueue.main) { slaveDeviceLinks in + LokiFileServerAPI.getDeviceLinks(associatedWith: getUserHexEncodedPublicKey()).done2 { slaveDeviceLinks in // Check that the device link IS present on the file server. // Note that the device link as seen from the master device's perspective has been deleted at this point, but the // device link as seen from the slave perspective hasn't. @@ -265,7 +265,9 @@ public final class MultiDeviceProtocol : NSObject { LokiFileServerAPI.removeDeviceLink(deviceLink) // Attempt to clean up on the file server } UserDefaults.standard[.wasUnlinked] = true - NotificationCenter.default.post(name: .dataNukeRequested, object: nil) + DispatchQueue.main.async { + NotificationCenter.default.post(name: .dataNukeRequested, object: nil) + } } } }