mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-10 01:08:23 +02:00
retry focus until it works on pin lock page
This commit is contained in:
parent
9ae39f3900
commit
66996f491c
@ -5,6 +5,7 @@ using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
using Bit.App.Models.Page;
|
||||
using Bit.App.Controls;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Bit.App.Pages
|
||||
{
|
||||
@ -79,7 +80,29 @@ namespace Bit.App.Pages
|
||||
_tgr.Tapped += Tgr_Tapped;
|
||||
PinControl.OnPinEntered += PinEntered;
|
||||
PinControl.InitEvents();
|
||||
PinControl.Entry.FocusWithDelay();
|
||||
|
||||
if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
if(!PinControl.Entry.IsFocused)
|
||||
{
|
||||
Device.BeginInvokeOnMainThread(() => PinControl.Entry.Focus());
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
PinControl.Entry.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDisappearing()
|
||||
|
Loading…
Reference in New Issue
Block a user