set type selected index later

This commit is contained in:
Kyle Spearrin 2019-06-01 23:09:38 -04:00
parent 312b6c2d44
commit 1d95c73173

View file

@ -317,7 +317,6 @@ namespace Bit.App.Pages
}; };
Cipher.Login.Uris = new List<LoginUriView> { new LoginUriView { Uri = DefaultUri } }; Cipher.Login.Uris = new List<LoginUriView> { new LoginUriView { Uri = DefaultUri } };
Cipher.SecureNote.Type = SecureNoteType.Generic; Cipher.SecureNote.Type = SecureNoteType.Generic;
TypeSelectedIndex = TypeOptions.FindIndex(k => k.Value == Cipher.Type);
if(appOptions != null) if(appOptions != null)
{ {
@ -335,6 +334,7 @@ namespace Bit.App.Pages
} }
} }
TypeSelectedIndex = TypeOptions.FindIndex(k => k.Value == Cipher.Type);
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 :