pull/70/head
Niels Andriesse 5 years ago
parent d62bfa853f
commit d79bd5434b

@ -308,7 +308,7 @@ final class SeedVC : OnboardingBaseViewController, DeviceLinkingModalDelegate, O
}.catch(on: DispatchQueue.main) { [weak self] _ in
TSAccountManager.sharedInstance().resetForReregistration()
guard let self = self else { return }
let alert = UIAlertController(title: NSLocalizedString("Couldn't Link Device", comment: ""), message: NSLocalizedString("Please check your connection and try again.", comment: ""), preferredStyle: .alert)
let alert = UIAlertController(title: NSLocalizedString("Couldn't Link Device", comment: ""), message: NSLocalizedString("Please check your internet connection and try again", comment: ""), preferredStyle: .alert)
self.present(alert, animated: true, completion: nil)
self.setUserInteractionEnabled(true)
}

@ -135,9 +135,14 @@ final class DeviceLinksVC : UIViewController, UITableViewDataSource, UITableView
private func removeDeviceLink(_ deviceLink: DeviceLink) {
LokiStorageAPI.removeDeviceLink(deviceLink).done { [weak self] in
guard let thread = TSContactThread.fetch(uniqueId: TSContactThread.threadId(fromContactId: deviceLink.other.hexEncodedPublicKey)) else { return }
let linkedDeviceHexEncodedPublicKey = deviceLink.other.hexEncodedPublicKey
guard let thread = TSContactThread.fetch(uniqueId: TSContactThread.threadId(fromContactId: linkedDeviceHexEncodedPublicKey)) else { return }
let unlinkDeviceMessage = UnlinkDeviceMessage(thread: thread)!
ThreadUtil.enqueue(unlinkDeviceMessage)
let storage = OWSPrimaryStorage.shared()
storage.dbReadWriteConnection.readWrite { transaction in
storage.archiveAllSessions(forContact: linkedDeviceHexEncodedPublicKey, protocolContext: transaction)
}
self?.updateDeviceLinks()
}.catch { [weak self] _ in
let alert = UIAlertController(title: NSLocalizedString("Couldn't Unlink Device", comment: ""), message: NSLocalizedString("Please check your internet connection and try again", comment: ""), preferredStyle: .alert)

@ -2665,6 +2665,7 @@
"Enter a Name" = "Enter a Name";
"Error" = "Error";
"Please pick a name" = "Please pick a name";
"Couldn't Link Device" = "Couldn't Link Device";
"Couldn't Unlink Device" = "Couldn't Unlink Device";
"Please check your internet connection and try again" = "Please check your internet connection and try again";
"Device Unlinked" = "Device Unlinked";

Loading…
Cancel
Save