mirror of
https://github.com/bitwarden/mobile
synced 2026-01-04 09:33:16 +00:00
properly init events when provider changes
This commit is contained in:
@@ -252,15 +252,20 @@ namespace Bit.App.Pages
|
||||
base.OnAppearing();
|
||||
ListenYubiKey(true);
|
||||
|
||||
InitEvents();
|
||||
if(TokenCell == null && Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "DismissKeyboard");
|
||||
}
|
||||
}
|
||||
|
||||
private void InitEvents()
|
||||
{
|
||||
if(TokenCell != null)
|
||||
{
|
||||
TokenCell.InitEvents();
|
||||
TokenCell.Entry.Completed += Entry_Completed;
|
||||
}
|
||||
else if(Device.RuntimePlatform == Device.Android)
|
||||
{
|
||||
MessagingCenter.Send(Application.Current, "DismissKeyboard");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDisappearing()
|
||||
@@ -336,6 +341,7 @@ namespace Bit.App.Pages
|
||||
Init();
|
||||
ListenYubiKey(false, beforeProviderType == TwoFactorProviderType.YubiKey);
|
||||
ListenYubiKey(true);
|
||||
InitEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user