mirror of
https://github.com/bitwarden/mobile
synced 2026-01-04 09:33:16 +00:00
lazy decrypt password and username for vault listing. dynamically show copy and url launch options if provided.
This commit is contained in:
@@ -16,16 +16,16 @@ namespace Bit.App.Models.Page
|
||||
FolderId = folderId;
|
||||
Name = site.Name?.Decrypt();
|
||||
Username = site.Username?.Decrypt() ?? " ";
|
||||
Password = site.Password?.Decrypt();
|
||||
Uri = site.Uri?.Decrypt();
|
||||
Password = new Lazy<string>(() => site.Password?.Decrypt());
|
||||
Uri = new Lazy<string>(() => site.Uri?.Decrypt());
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string FolderId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string Uri { get; set; }
|
||||
public Lazy<string> Password { get; set; }
|
||||
public Lazy<string> Uri { get; set; }
|
||||
}
|
||||
|
||||
public class Folder : List<Site>
|
||||
|
||||
@@ -61,9 +61,11 @@ namespace Bit.App.Models.Page
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(nameof(Uri)));
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(nameof(UriHost)));
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(nameof(ShowUri)));
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(nameof(ShowLaunch)));
|
||||
}
|
||||
}
|
||||
public bool ShowUri => !string.IsNullOrWhiteSpace(Uri);
|
||||
public bool ShowLaunch => Uri.StartsWith("http://") || Uri.StartsWith("https://");
|
||||
|
||||
public string UriHost
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user