Skip to content

Commit

Permalink
Fix mozilla-mobile#6647: Send to device extension needs to wait for F…
Browse files Browse the repository at this point in the history
…xA to initialize
  • Loading branch information
garvankeeley committed May 21, 2020
1 parent a5b94d1 commit a9aaaae
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Extensions/ShareTo/ShareViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,14 @@ extension ShareViewController {
}

gesture.isEnabled = false
sendToDevice = SendToDevice()
guard let sendToDevice = sendToDevice else { return }
sendToDevice.sharedItem = item
sendToDevice.delegate = delegate
let vc = sendToDevice.initialViewController()
navigationController?.pushViewController(vc, animated: true)
RustFirefoxAccounts.shared.accountManager.uponQueue(.main) { _ in
self.sendToDevice = SendToDevice()
guard let sendToDevice = self.sendToDevice else { return }
sendToDevice.sharedItem = item
sendToDevice.delegate = self.delegate
let vc = sendToDevice.initialViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
}

func openFirefox(withUrl url: String, isSearch: Bool) {
Expand Down

0 comments on commit a9aaaae

Please sign in to comment.