mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
properly init events when provider changes
This commit is contained in:
parent
aa22e7e952
commit
dbdc660464
1 changed files with 10 additions and 4 deletions
|
@ -252,15 +252,20 @@ namespace Bit.App.Pages
|
||||||
base.OnAppearing();
|
base.OnAppearing();
|
||||||
ListenYubiKey(true);
|
ListenYubiKey(true);
|
||||||
|
|
||||||
|
InitEvents();
|
||||||
|
if(TokenCell == null && Device.RuntimePlatform == Device.Android)
|
||||||
|
{
|
||||||
|
MessagingCenter.Send(Application.Current, "DismissKeyboard");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitEvents()
|
||||||
|
{
|
||||||
if(TokenCell != null)
|
if(TokenCell != null)
|
||||||
{
|
{
|
||||||
TokenCell.InitEvents();
|
TokenCell.InitEvents();
|
||||||
TokenCell.Entry.Completed += Entry_Completed;
|
TokenCell.Entry.Completed += Entry_Completed;
|
||||||
}
|
}
|
||||||
else if(Device.RuntimePlatform == Device.Android)
|
|
||||||
{
|
|
||||||
MessagingCenter.Send(Application.Current, "DismissKeyboard");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDisappearing()
|
protected override void OnDisappearing()
|
||||||
|
@ -336,6 +341,7 @@ namespace Bit.App.Pages
|
||||||
Init();
|
Init();
|
||||||
ListenYubiKey(false, beforeProviderType == TwoFactorProviderType.YubiKey);
|
ListenYubiKey(false, beforeProviderType == TwoFactorProviderType.YubiKey);
|
||||||
ListenYubiKey(true);
|
ListenYubiKey(true);
|
||||||
|
InitEvents();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue