1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 07:13:33 +00:00

Forms update with CollectionView conversion (#1374)

* Forms update with CollectionView conversion

* updates

* removed unnecessary import
This commit is contained in:
Matt Portune
2021-05-13 14:36:20 -04:00
committed by GitHub
parent 29979f6b04
commit 1d4e742d66
53 changed files with 940 additions and 1483 deletions

View File

@@ -6,11 +6,30 @@ namespace Bit.App.Controls
public class CipherViewCellViewModel : ExtendedViewModel
{
private CipherView _cipher;
private bool _websiteIconsEnabled;
public CipherViewCellViewModel(CipherView cipherView, bool websiteIconsEnabled)
{
Cipher = cipherView;
WebsiteIconsEnabled = websiteIconsEnabled;
}
public CipherView Cipher
{
get => _cipher;
set => SetProperty(ref _cipher, value);
}
public bool WebsiteIconsEnabled
{
get => _websiteIconsEnabled;
set => SetProperty(ref _websiteIconsEnabled, value);
}
public bool ShowIconImage
{
get => WebsiteIconsEnabled && !string.IsNullOrWhiteSpace(Cipher.Login?.Uri) &&
Cipher.Login.Uri.StartsWith("http");
}
}
}