diff --git a/src/Core/Pages/Accounts/LoginPasswordlessViewModel.cs b/src/Core/Pages/Accounts/LoginPasswordlessViewModel.cs index a5809659c..95033c7e1 100644 --- a/src/Core/Pages/Accounts/LoginPasswordlessViewModel.cs +++ b/src/Core/Pages/Accounts/LoginPasswordlessViewModel.cs @@ -77,6 +77,7 @@ namespace Bit.App.Pages { _requestTimeCts?.Cancel(); _requestTimeCts?.Dispose(); + _requestTimeCts = null; } catch (Exception ex) { diff --git a/src/Core/Utilities/TimerTask.cs b/src/Core/Utilities/TimerTask.cs index 27e0b81af..f2ac98778 100644 --- a/src/Core/Utilities/TimerTask.cs +++ b/src/Core/Utilities/TimerTask.cs @@ -1,9 +1,4 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using Bit.Core.Abstractions; -using Microsoft.Maui.Controls; -using Microsoft.Maui; +using Bit.Core.Abstractions; namespace Bit.App.Utilities { @@ -37,7 +32,7 @@ namespace Bit.App.Utilities { while (!_cancellationTokenSource.IsCancellationRequested) { - await Device.InvokeOnMainThreadAsync(async () => + await MainThread.InvokeOnMainThreadAsync(async () => { if (!_cancellationTokenSource.IsCancellationRequested) {