Closed AaronMT closed 2 years ago
Hey @AaronMT,
I'm trying to solve this bug. First I readed the thread on the other issue (#283) and I noticed this PR (https://github.com/mozilla-mobile/focus-ios/pull/281) by @boek, that was merged on master.
But I can't see some files on my project like Blockzilla/Browser.swift
either the changes on the other files.
I tried to reach someone at iRC, to help me with this but without success.
What i'm doing wrong?
You are not doing anything wrong.
I believe this code was refactored or just straight up removed with the https://github.com/mozilla-mobile/focus-ios/commit/6e1edeb555e7b1d3d34cba3336a125998bd7a63c#diff-93f8e8b1353c1dabb447526fe4178103 WKWebView migration (@boek ?)
(Also we're in #Focus on irc.mozilla.org)
btw, I think this method is not being used on BrowserViewController.swift
fileprivate func presentImageActionSheet(title: String, link: String?, saveAction: @escaping () -> Void, copyAction: @escaping () -> Void) {
let alertController = UIAlertController(title: title.truncated(limit: 160, position: .middle), message: nil, preferredStyle: .actionSheet)
if let link = link {
alertController.addAction(UIAlertAction(title: UIConstants.strings.copyLink, style: .default) { _ in
UIPasteboard.general.string = link
})
alertController.addAction(UIAlertAction(title: UIConstants.strings.shareLink, style: .default) { _ in
let activityViewController = UIActivityViewController(activityItems: [link], applicationActivities: nil)
self.present(activityViewController, animated: true, completion: nil)
})
}
alertController.addAction(UIAlertAction(title: UIConstants.strings.saveImage, style: .default) { _ in saveAction() })
alertController.addAction(UIAlertAction(title: UIConstants.strings.copyImage, style: .default) { _ in copyAction() })
alertController.addAction(UIAlertAction(title: UIConstants.strings.cancel, style: .cancel))
alertController.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.init(rawValue: 0)
alertController.popoverPresentationController?.sourceView = self.view
alertController.popoverPresentationController?.sourceRect = CGRect(x: self.view.bounds.size.width / 2.0, y: self.view.bounds.size.height / 2.0, width: 1.0, height: 1.0)
present(alertController, animated: true, completion: nil)
}
thanks @AaronMT I joined the channel!
Is this also an issue in the current release (3.10)?
@AaronMT ???
@Sdaswani, i’ve Tested on my phone with the last version of focus released on App Store and the problem happens too
When we moved to WKWebView we used their native context menu over using our own. The big problem with this now is we aren't showing our own guard prompt in front of the system one. We'll have to go back to our own context menu to bring this functionality back :(
OK no need to fix for 3.11, we'll handle it in triage.
That seems like an overall poor choice for code management. Maybe we should just disregard this feature.
@boek could you please file a bug that adds a probe for users having the photo access denied. Let's decide then
According to https://github.com/mozilla-mobile/focus-ios/issues/283 I should be re-prompted on saving images to camera roll.
Nothing.