mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
fix ipad crash on doc picker
This commit is contained in:
parent
5a3d86a12a
commit
2ad709dae4
1 changed files with 7 additions and 0 deletions
|
@ -152,6 +152,13 @@ namespace Bit.iOS.Services
|
|||
e.DocumentPicker.DidPickDocument += DocumentPicker_DidPickDocument;
|
||||
};
|
||||
|
||||
var root = UIApplication.SharedApplication.KeyWindow.RootViewController;
|
||||
if(picker.PopoverPresentationController != null && root != null)
|
||||
{
|
||||
picker.PopoverPresentationController.SourceView = root.View;
|
||||
picker.PopoverPresentationController.SourceRect = root.View.Bounds;
|
||||
}
|
||||
|
||||
controller.PresentViewController(picker, true, null);
|
||||
return Task.FromResult(0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue