pull/214/head
nielsandriesse 5 years ago
parent 620a093214
commit 757f14c338

@ -254,7 +254,7 @@ public final class MultiDeviceProtocol : NSObject {
}) { }) {
return 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. // 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 // 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. // device link as seen from the slave perspective hasn't.
@ -265,10 +265,12 @@ public final class MultiDeviceProtocol : NSObject {
LokiFileServerAPI.removeDeviceLink(deviceLink) // Attempt to clean up on the file server LokiFileServerAPI.removeDeviceLink(deviceLink) // Attempt to clean up on the file server
} }
UserDefaults.standard[.wasUnlinked] = true UserDefaults.standard[.wasUnlinked] = true
DispatchQueue.main.async {
NotificationCenter.default.post(name: .dataNukeRequested, object: nil) NotificationCenter.default.post(name: .dataNukeRequested, object: nil)
} }
} }
} }
}
// MARK: - General // MARK: - General
public static func getUserLinkedDevices() -> Set<String> { public static func getUserLinkedDevices() -> Set<String> {

Loading…
Cancel
Save