mirror of
https://github.com/bitwarden/mobile
synced 2025-12-13 06:43:17 +00:00
[EC-303] Add warning when vault timeout is set to "Never" (#1976)
* Added to AppResources.resx the message warning the user about setting the lockout option to "Never" * Added the condition to check the newly selected option on the vault timeout settings * Changed the wording on the warning as to reflect the mobile version * Changed the vault timeout modal to have the ability to cancel * Simplified the reversion of value if the user cancels the change
This commit is contained in:
@@ -257,6 +257,17 @@ namespace Bit.App.Pages
|
||||
}
|
||||
var cleanSelection = selection.Replace("✓ ", string.Empty);
|
||||
var selectionOption = _vaultTimeouts.FirstOrDefault(o => o.Key == cleanSelection);
|
||||
|
||||
// Check if the selected Timeout action is "Never" and if it's different from the previous selected value
|
||||
if (selectionOption.Value == null && selectionOption.Value != oldTimeout)
|
||||
{
|
||||
var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.NeverLockWarning,
|
||||
AppResources.Warning, AppResources.Yes, AppResources.Cancel);
|
||||
if (!confirmed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
_vaultTimeoutDisplayValue = selectionOption.Key;
|
||||
newTimeout = selectionOption.Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user