From e7df75258131d2494bf4f8c497d21d1be30e18ac Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 10 Jun 2019 10:53:11 -0400 Subject: [PATCH] fix yubikey listening --- src/App/Pages/Accounts/TwoFactorPage.xaml.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs index 1c3085490..5526eaa33 100644 --- a/src/App/Pages/Accounts/TwoFactorPage.xaml.cs +++ b/src/App/Pages/Accounts/TwoFactorPage.xaml.cs @@ -90,8 +90,17 @@ namespace Bit.App.Pages if(!_vm.YubikeyMethod) { _messagingService.Send("listenYubiKeyOTP", false); + _broadcasterService.Unsubscribe(nameof(TwoFactorPage)); } - _broadcasterService.Unsubscribe(nameof(TwoFactorPage)); + } + protected override bool OnBackButtonPressed() + { + if(_vm.YubikeyMethod) + { + _messagingService.Send("listenYubiKeyOTP", false); + _broadcasterService.Unsubscribe(nameof(TwoFactorPage)); + } + return base.OnBackButtonPressed(); } private async void Continue_Clicked(object sender, EventArgs e)