1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-24 16:38:22 +01:00

fix opening file on ipad

This commit is contained in:
kspearrin 2019-01-25 08:51:10 -05:00
parent 1374ee31ba
commit d20b3cadbf

View File

@ -73,7 +73,9 @@ namespace Bit.iOS.Services
var url = NSUrl.FromFilename(filePath);
var viewer = UIDocumentInteractionController.FromUrl(url);
var controller = GetVisibleViewController();
return viewer.PresentOpenInMenu(controller.View.Frame, controller.View, true);
var rect = UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad ?
new CGRect(100, 5, 320, 320) : controller.View.Frame;
return viewer.PresentOpenInMenu(rect, controller.View, true);
}
public bool CanOpenFile(string fileName)