From 3315704c142ae56f5786bb09823a2bd195fffca7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 24 May 2018 22:34:17 -0400 Subject: [PATCH] cleanup --- src/iOS/AppDelegate.cs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/iOS/AppDelegate.cs b/src/iOS/AppDelegate.cs index 5b1a666ae..601071f20 100644 --- a/src/iOS/AppDelegate.cs +++ b/src/iOS/AppDelegate.cs @@ -116,19 +116,17 @@ namespace Bit.iOS MessagingCenter.Subscribe(Xamarin.Forms.Application.Current, "ListenYubiKeyOTP", (sender, listen) => { - if(!_deviceInfoService.NfcEnabled) + if(_deviceInfoService.NfcEnabled) { - return; - } - - _nfcSession?.InvalidateSession(); - _nfcSession?.Dispose(); - _nfcSession = null; - if(listen) - { - _nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true); - _nfcSession.AlertMessage = AppResources.HoldYubikeyNearTop; - _nfcSession.BeginSession(); + _nfcSession?.InvalidateSession(); + _nfcSession?.Dispose(); + _nfcSession = null; + if(listen) + { + _nfcSession = new NFCNdefReaderSession(_nfcDelegate, null, true); + _nfcSession.AlertMessage = AppResources.HoldYubikeyNearTop; + _nfcSession.BeginSession(); + } } });