mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
null checks
This commit is contained in:
parent
3bd01067e3
commit
a535e8a82b
2 changed files with 4 additions and 4 deletions
|
@ -313,11 +313,11 @@ namespace Bit.App.Pages
|
||||||
|
|
||||||
FolderSelectedIndex = string.IsNullOrWhiteSpace(Cipher.FolderId) ? FolderOptions.Count - 1 :
|
FolderSelectedIndex = string.IsNullOrWhiteSpace(Cipher.FolderId) ? FolderOptions.Count - 1 :
|
||||||
FolderOptions.FindIndex(k => k.Value == Cipher.FolderId);
|
FolderOptions.FindIndex(k => k.Value == Cipher.FolderId);
|
||||||
CardBrandSelectedIndex = string.IsNullOrWhiteSpace(Cipher?.Card.Brand) ? 0 :
|
CardBrandSelectedIndex = string.IsNullOrWhiteSpace(Cipher.Card?.Brand) ? 0 :
|
||||||
CardBrandOptions.FindIndex(k => k.Value == Cipher.Card.Brand);
|
CardBrandOptions.FindIndex(k => k.Value == Cipher.Card.Brand);
|
||||||
CardExpMonthSelectedIndex = string.IsNullOrWhiteSpace(Cipher?.Card.ExpMonth) ? 0 :
|
CardExpMonthSelectedIndex = string.IsNullOrWhiteSpace(Cipher.Card?.ExpMonth) ? 0 :
|
||||||
CardExpMonthOptions.FindIndex(k => k.Value == Cipher.Card.ExpMonth);
|
CardExpMonthOptions.FindIndex(k => k.Value == Cipher.Card.ExpMonth);
|
||||||
IdentityTitleSelectedIndex = string.IsNullOrWhiteSpace(Cipher?.Identity.Title) ? 0 :
|
IdentityTitleSelectedIndex = string.IsNullOrWhiteSpace(Cipher.Identity?.Title) ? 0 :
|
||||||
IdentityTitleOptions.FindIndex(k => k.Value == Cipher.Identity.Title);
|
IdentityTitleOptions.FindIndex(k => k.Value == Cipher.Identity.Title);
|
||||||
OwnershipSelectedIndex = string.IsNullOrWhiteSpace(Cipher.OrganizationId) ? 0 :
|
OwnershipSelectedIndex = string.IsNullOrWhiteSpace(Cipher.OrganizationId) ? 0 :
|
||||||
OwnershipOptions.FindIndex(k => k.Value == Cipher.OrganizationId);
|
OwnershipOptions.FindIndex(k => k.Value == Cipher.OrganizationId);
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace Bit.Core.Models.Domain
|
||||||
OrganizationUseTotp = obj.OrganizationUseTotp;
|
OrganizationUseTotp = obj.OrganizationUseTotp;
|
||||||
Edit = obj.Edit;
|
Edit = obj.Edit;
|
||||||
RevisionDate = obj.RevisionDate;
|
RevisionDate = obj.RevisionDate;
|
||||||
CollectionIds = new HashSet<string>(obj.CollectionIds);
|
CollectionIds = obj.CollectionIds != null ? new HashSet<string>(obj.CollectionIds) : null;
|
||||||
LocalData = localData;
|
LocalData = localData;
|
||||||
|
|
||||||
switch(Type)
|
switch(Type)
|
||||||
|
|
Loading…
Reference in a new issue