1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00

[PM-7186] Fallback to password list on exception (#3127)

* PM-7186 Added fallback in case of exception that loads password list

* PM-7186 Added back the error message removed in last commit.
This commit is contained in:
Dinis Vieira 2024-04-02 20:52:21 +01:00 committed by GitHub
parent 4633fea41e
commit 856a084a47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -215,9 +215,14 @@ namespace Bit.iOS.Autofill
{
if (Context?.IsExecutingWithoutUserInteraction == false)
{
await _platformUtilsService.Value.ShowDialogAsync(
_ = _platformUtilsService.Value.ShowDialogAsync(
string.Format(AppResources.ThereWasAProblemReadingAPasskeyForXTryAgainLater, Context.PasskeyCredentialRequestParameters.RelyingPartyIdentifier),
AppResources.ErrorReadingPasskey);
TableView.SectionHeaderHeight = 0;
Context.IsPasswordFallback = true;
await ReloadItemsAsync();
_alreadyLoadItemsOnce = true;
}
}
catch (Exception ex)

View File

@ -70,7 +70,9 @@ namespace Bit.iOS.Autofill.Models
public bool IsPasskey => PasskeyCredentialRequest != null;
public bool IsPreparingListForPasskey => PasskeyCredentialRequestParameters != null;
public bool IsPasswordFallback { get; set; }
public bool IsPreparingListForPasskey => PasskeyCredentialRequestParameters != null && !IsPasswordFallback;
public bool IsCreatingOrPreparingListForPasskey => IsCreatingPasskey || IsPreparingListForPasskey;
}