diff --git a/src/iOS.Extension/Models/LoginViewModel.cs b/src/iOS.Extension/Models/LoginViewModel.cs index 72a40254a..0ab937e12 100644 --- a/src/iOS.Extension/Models/LoginViewModel.cs +++ b/src/iOS.Extension/Models/LoginViewModel.cs @@ -7,27 +7,27 @@ namespace Bit.iOS.Extension.Models { public class LoginViewModel { - public LoginViewModel(Cipher login) + public LoginViewModel(Cipher cipher) { - Id = login.Id; - Name = login.Name?.Decrypt(login.OrganizationId); - Username = login.Username?.Decrypt(login.OrganizationId); - Password = login.Password?.Decrypt(login.OrganizationId); - Uri = login.Uri?.Decrypt(login.OrganizationId); - Totp = new Lazy(() => login.Totp?.Decrypt(login.OrganizationId)); + Id = cipher.Id; + Name = cipher.Name?.Decrypt(cipher.OrganizationId); + Username = cipher.Login?.Username?.Decrypt(cipher.OrganizationId); + Password = cipher.Login?.Password?.Decrypt(cipher.OrganizationId); + Uri = cipher.Login?.Uri?.Decrypt(cipher.OrganizationId); + Totp = new Lazy(() => cipher.Login?.Totp?.Decrypt(cipher.OrganizationId)); Fields = new Lazy>>(() => { - if(!login.Fields?.Any() ?? true) + if(!cipher.Fields?.Any() ?? true) { return null; } var fields = new List>(); - foreach(var field in login.Fields) + foreach(var field in cipher.Fields) { fields.Add(new Tuple( - field.Name?.Decrypt(login.OrganizationId), - field.Value?.Decrypt(login.OrganizationId))); + field.Name?.Decrypt(cipher.OrganizationId), + field.Value?.Decrypt(cipher.OrganizationId))); } return fields; });