diff --git a/src/iOS.Extension/LoginListViewController.cs b/src/iOS.Extension/LoginListViewController.cs index ea7917c76..3df4654d4 100644 --- a/src/iOS.Extension/LoginListViewController.cs +++ b/src/iOS.Extension/LoginListViewController.cs @@ -9,6 +9,8 @@ using MobileCoreServices; using Bit.iOS.Core.Controllers; using Bit.App.Resources; using Bit.iOS.Core.Views; +using Bit.App.Abstractions; +using Bit.Core.Utilities; namespace Bit.iOS.Extension { @@ -18,10 +20,12 @@ namespace Bit.iOS.Extension : base(handle) { DismissModalAction = Cancel; + PasswordRepromptService = ServiceContainer.Resolve("passwordRepromptService"); } public Context Context { get; set; } public LoadingViewController LoadingController { get; set; } + public IPasswordRepromptService PasswordRepromptService { get; private set; } public async override void ViewDidLoad() { @@ -104,7 +108,7 @@ namespace Bit.iOS.Extension _controller = controller; } - public override void RowSelected(UITableView tableView, NSIndexPath indexPath) + public async override void RowSelected(UITableView tableView, NSIndexPath indexPath) { tableView.DeselectRow(indexPath, true); tableView.EndEditing(true); @@ -122,6 +126,11 @@ namespace Bit.iOS.Extension return; } + if (item.Reprompt != Bit.Core.Enums.CipherRepromptType.None && !await _controller.PasswordRepromptService.ShowPasswordPromptAsync()) + { + return; + } + if (_controller.CanAutoFill() && !string.IsNullOrWhiteSpace(item.Password)) { string totp = null;