mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 09:13:15 +00:00
PM-3350 Fix iOS extensions navigation and Window/RootViewController handling for TapGestureRecognizer to work
This commit is contained in:
@@ -137,6 +137,23 @@ namespace Bit.iOS.ShareExtension
|
||||
}
|
||||
}
|
||||
|
||||
#if !ENABLED_TAP_GESTURE_RECOGNIZER_MAUI_EMBEDDED_WORKAROUND
|
||||
|
||||
private void NavigateToPage(ContentPage page)
|
||||
{
|
||||
var navigationPage = new NavigationPage(page);
|
||||
|
||||
var window = new Window(navigationPage);
|
||||
window.ToHandler(MauiContextSingleton.Instance.MauiContext);
|
||||
|
||||
_currentModalController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
_currentModalController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
_presentingOnNavigationPage = true;
|
||||
PresentViewController(_currentModalController, true, null);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
public void DismissLockAndContinue()
|
||||
{
|
||||
Debug.WriteLine("BW Log, Dismissing lock controller.");
|
||||
@@ -197,19 +214,6 @@ namespace Bit.iOS.ShareExtension
|
||||
NavigateToPage(sendPage);
|
||||
}
|
||||
|
||||
private void NavigateToPage(ContentPage page)
|
||||
{
|
||||
var navigationPage = new NavigationPage(page);
|
||||
|
||||
var window = new Window(navigationPage);
|
||||
window.ToHandler(MauiContextSingleton.Instance.MauiContext);
|
||||
|
||||
_currentModalController = navigationPage.ToUIViewController(MauiContextSingleton.Instance.MauiContext);
|
||||
_currentModalController.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
|
||||
_presentingOnNavigationPage = true;
|
||||
PresentViewController(_currentModalController, true, null);
|
||||
}
|
||||
|
||||
private async Task<(string, byte[])> LoadDataBytesAsync()
|
||||
{
|
||||
var itemProvider = ExtensionContext?.InputItems.FirstOrDefault()?.Attachments?.FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user