1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 16:53:26 +00:00

fix for stuck extension sheets when dismissed by swipe (#1117)

* fix for stuck extension sheets when dismissed by swipe

* simplify dismiss action assignments
This commit is contained in:
Matt Portune
2020-10-15 14:34:31 -04:00
committed by GitHub
parent 523e713d7a
commit b163a0fe77
17 changed files with 131 additions and 8 deletions

View File

@@ -16,7 +16,9 @@ namespace Bit.iOS.Autofill
{
public LoginListViewController(IntPtr handle)
: base(handle)
{ }
{
DismissModalAction = Cancel;
}
public Context Context { get; set; }
public CredentialProviderViewController CPViewController { get; set; }
@@ -42,6 +44,11 @@ namespace Bit.iOS.Autofill
}
partial void CancelBarButton_Activated(UIBarButtonItem sender)
{
Cancel();
}
private void Cancel()
{
CPViewController.CompleteRequest();
}
@@ -64,12 +71,16 @@ namespace Bit.iOS.Autofill
{
addLoginController.Context = Context;
addLoginController.LoginListController = this;
segue.DestinationViewController.PresentationController.Delegate =
new CustomPresentationControllerDelegate(addLoginController.DismissModalAction);
}
if (navController.TopViewController is LoginSearchViewController searchLoginController)
{
searchLoginController.Context = Context;
searchLoginController.CPViewController = CPViewController;
searchLoginController.FromList = true;
segue.DestinationViewController.PresentationController.Delegate =
new CustomPresentationControllerDelegate(searchLoginController.DismissModalAction);
}
}
}