Improve TOTP scan performance on Android

This commit is contained in:
mpbw2 2024-01-17 13:03:11 -05:00
parent 66f0471f2e
commit 55fb71744d
No known key found for this signature in database

View file

@ -54,6 +54,13 @@ namespace Bit.App.Pages
{ {
if (_cameraView == null) { return; } if (_cameraView == null) { return; }
if (DeviceInfo.Platform == DevicePlatform.Android)
{
// Reduce the size of the camera view to improve performance, scale it up to fill the space
_cameraView.WidthRequest = _cameraView.HeightRequest = 150;
_cameraView.Scale = 4;
}
ViewModel.StartCameraCommand?.Execute(this); ViewModel.StartCameraCommand?.Execute(this);
_pageIsActive = true; _pageIsActive = true;