Fix opening context menu previews

Closes #43
This commit is contained in:
Shadowfacts 2019-09-14 16:48:43 -04:00
parent d3e31541cf
commit dfb72edbd8
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 4 additions and 4 deletions

View File

@ -55,11 +55,11 @@ extension EnhancedTableViewController {
} }
} }
override func tableView(_ tableView: UITableView, willCommitMenuWithAnimator animator: UIContextMenuInteractionCommitAnimating) { override func tableView(_ tableView: UITableView, willPerformPreviewActionForMenuWith configuration: UIContextMenuConfiguration, animator: UIContextMenuInteractionCommitAnimating) {
if /*animator.preferredCommitStyle == .pop,*/ // preferredCommitStyle is always .dismiss, see FB6113554 if let viewController = animator.previewViewController {
let viewController = animator.previewViewController { animator.preferredCommitStyle = .pop
animator.addCompletion { animator.addCompletion {
if viewController is LargeImageViewController || viewController is SFSafariViewController { if viewController is LargeImageViewController || viewController is GalleryViewController || viewController is SFSafariViewController {
self.present(viewController, animated: true) self.present(viewController, animated: true)
} else { } else {
self.show(viewController, sender: nil) self.show(viewController, sender: nil)