mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 21:33:36 +00:00
[PM-6655] Add username empty fallback on passkey (#3101)
* PM-6655 Added fallback "Unknown account" to passkey username and moved it so it can be shared with Android * PM-6655 Improved code lines formatting
This commit is contained in:
committed by
GitHub
parent
b931263662
commit
ff49d041be
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Domain;
|
||||
using Bit.Core.Resources.Localization;
|
||||
using Bit.Core.Utilities;
|
||||
|
||||
namespace Bit.Core.Models.View
|
||||
{
|
||||
@@ -40,4 +39,15 @@ namespace Bit.Core.Models.View
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public static class LoginViewExtensions
|
||||
{
|
||||
public static string GetMainFido2CredentialUsername(this LoginView loginView)
|
||||
{
|
||||
return loginView.MainFido2Credential.UserName
|
||||
.FallbackOnNullOrWhiteSpace(loginView.MainFido2Credential.UserDisplayName)
|
||||
.FallbackOnNullOrWhiteSpace(loginView.Username)
|
||||
.FallbackOnNullOrWhiteSpace(AppResources.UnknownAccount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user