Skip to content

Commit

Permalink
Fix #6647: Send to device extension needs to wait for FxA to initiali…
Browse files Browse the repository at this point in the history
…ze (#6666)

* Fix #6647: Send to device extension needs to wait for FxA to initialize

* disable user interaction
  • Loading branch information
garvankeeley committed May 21, 2020
1 parent 58d792a commit 5ad5f17
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Extensions/ShareTo/ShareViewController.swift
Expand Up @@ -367,12 +367,16 @@ 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)
view.isUserInteractionEnabled = false
RustFirefoxAccounts.shared.accountManager.uponQueue(.main) { _ in
self.view.isUserInteractionEnabled = true
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 5ad5f17

Please sign in to comment.