Skip to content

Commit

Permalink
Set SSO Presentation Sheets modal
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Sep 25, 2024
1 parent a54391c commit b6149c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ final class ReauthFallBackViewController: AuthFallBackViewController, Themable {
self.setupNavigationBar()
self.registerThemeServiceDidChangeThemeNotification()
self.update(theme: self.theme)

// Tchap: block dismissal of this Reauthentication sheet by dragging down.
// The user must use the close button.
if #available(iOS 13.0, *) {
self.isModalInPresentation = true
}
}

// MARK: - Public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,19 @@ - (void)presentFallbackForURL:(NSURL *)url
{
MXLogDebug(@"[DeactivateAccountViewController] Show fallback for url: %@", url)
SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:url];
safariViewController.modalPresentationStyle = UIModalPresentationFormSheet;
// Tchap: set modalPresentationStyle to 'currentContext' to enable safariViewController to be presented modaly.
// safariViewController.modalPresentationStyle = UIModalPresentationFormSheet;
safariViewController.modalPresentationStyle = UIModalPresentationCurrentContext;

safariViewController.delegate = self;

// Tchap: block dismissal of this SFSafariViewController sheet by dragging down.
// Else, the underlying activity indicator is not removed.
// The user must use the close button.
if (@available(iOS 13.0, *)) {
safariViewController.modalInPresentation = true;
}

[self presentViewController:safariViewController animated:YES completion:nil];
}

Expand Down

0 comments on commit b6149c2

Please sign in to comment.