diff --git a/src/App/Pages/Accounts/LockPageViewModel.cs b/src/App/Pages/Accounts/LockPageViewModel.cs index d8e620af0..775ab4cc0 100644 --- a/src/App/Pages/Accounts/LockPageViewModel.cs +++ b/src/App/Pages/Accounts/LockPageViewModel.cs @@ -161,7 +161,7 @@ namespace Bit.App.Pages public async Task InitAsync() { - _pinStatus = await _vaultTimeoutService.IsPinLockSetAsync(); + _pinStatus = await _vaultTimeoutService.GetPinLockTypeAsync(); var ephemeralPinSet = await _stateService.GetUserKeyPinEphemeralAsync() ?? await _stateService.GetPinProtectedKeyAsync(); diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs index 4fa793753..10339992d 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs @@ -138,7 +138,7 @@ namespace Bit.App.Pages t.Value != null).ToList(); } - var pinSet = await _vaultTimeoutService.IsPinLockSetAsync(); + var pinSet = await _vaultTimeoutService.GetPinLockTypeAsync(); _pin = pinSet != PinLockType.Disabled; _biometric = await _vaultTimeoutService.IsBiometricLockSetAsync(); _screenCaptureAllowed = await _stateService.GetScreenCaptureAllowedAsync(); diff --git a/src/Core/Abstractions/IVaultTimeoutService.cs b/src/Core/Abstractions/IVaultTimeoutService.cs index daf4865d2..2c1f9598d 100644 --- a/src/Core/Abstractions/IVaultTimeoutService.cs +++ b/src/Core/Abstractions/IVaultTimeoutService.cs @@ -17,7 +17,7 @@ namespace Bit.Core.Abstractions Task ShouldLockAsync(string userId = null); Task IsLoggedOutByTimeoutAsync(string userId = null); Task ShouldLogOutByTimeoutAsync(string userId = null); - Task IsPinLockSetAsync(string userId = null); + Task GetPinLockTypeAsync(string userId = null); Task IsBiometricLockSetAsync(string userId = null); Task LockAsync(bool allowSoftLock = false, bool userInitiated = false, string userId = null); Task LogOutAsync(bool userInitiated = true, string userId = null); diff --git a/src/Core/Services/VaultTimeoutService.cs b/src/Core/Services/VaultTimeoutService.cs index 1c1e61469..28a46f7f7 100644 --- a/src/Core/Services/VaultTimeoutService.cs +++ b/src/Core/Services/VaultTimeoutService.cs @@ -170,7 +170,7 @@ namespace Bit.Core.Services if (await _keyConnectorService.GetUsesKeyConnector()) { - var pinStatus = await IsPinLockSetAsync(userId); + var pinStatus = await GetPinLockTypeAsync(userId); var ephemeralPinSet = await _stateService.GetUserKeyPinEphemeralAsync() ?? await _stateService.GetPinProtectedKeyAsync(); var pinEnabled = (pinStatus == PinLockType.Transient && ephemeralPinSet != null) || @@ -225,7 +225,7 @@ namespace Bit.Core.Services await _tokenService.ToggleTokensAsync(); } - public async Task IsPinLockSetAsync(string userId = null) + public async Task GetPinLockTypeAsync(string userId = null) { // we can't depend on only the protected pin being set because old // versions only used it for MP on Restart diff --git a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs index c7e2a409d..c5f2dfabe 100644 --- a/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs +++ b/src/iOS.Core/Controllers/BaseLockPasswordViewController.cs @@ -110,7 +110,7 @@ namespace Bit.iOS.Core.Controllers } else { - _pinStatus = await _vaultTimeoutService.IsPinLockSetAsync(); + _pinStatus = await _vaultTimeoutService.GetPinLockTypeAsync(); var ephemeralPinSet = await _stateService.GetUserKeyPinEphemeralAsync() ?? await _stateService.GetPinProtectedKeyAsync(); diff --git a/src/iOS.Core/Controllers/LockPasswordViewController.cs b/src/iOS.Core/Controllers/LockPasswordViewController.cs index 8776bcc3a..981bd5d88 100644 --- a/src/iOS.Core/Controllers/LockPasswordViewController.cs +++ b/src/iOS.Core/Controllers/LockPasswordViewController.cs @@ -102,7 +102,7 @@ namespace Bit.iOS.Core.Controllers } else { - _pinStatus = await _vaultTimeoutService.IsPinLockSetAsync(); + _pinStatus = await _vaultTimeoutService.GetPinLockTypeAsync(); var ephemeralPinSet = await _stateService.GetUserKeyPinEphemeralAsync() ?? await _stateService.GetPinProtectedKeyAsync();