Skip to content

Commit 29cd627

Browse files
committed
Use .overCurrentContext to present both Share and Save to Draft
Using `.overFullScreen` or leaving `.automatic` resulted in Share being dismissable via swipe but that didn't restore Safari to the share menu, leaving it instead blocked as if the presented VC was still there. `.overCurrentContext` has no effect on the Save to Draft behavior, leaving it the same as when using `.overFullScreen`. On iPad, this setting result in both extensions not being full screen. Otherwise, Share would have been full screen while Save to Draft wouldn't.
1 parent d00af63 commit 29cd627

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

WordPress/WordPressShareExtension/MainShareViewController.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,8 @@ private extension MainShareViewController {
115115

116116
let shareNavController = UINavigationController(rootViewController: editorController)
117117

118-
if editorController.originatingExtension == .saveToDraft {
119-
// We need to make sure we don't end up with stacked modal view controllers by using this:
120-
shareNavController.modalPresentationStyle = .overFullScreen
121-
}
118+
// We need to make sure we don't end up with stacked modal view controllers by using this:
119+
shareNavController.modalPresentationStyle = .overCurrentContext
122120

123121
present(shareNavController, animated: true)
124122
}

0 commit comments

Comments
 (0)