From e6f3ad60ef635934a783e25a81dca01250b01811 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 6 Mar 2018 13:32:58 -0500 Subject: [PATCH] move fields above attachments on view --- src/App/Pages/Vault/VaultViewCipherPage.cs | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/App/Pages/Vault/VaultViewCipherPage.cs b/src/App/Pages/Vault/VaultViewCipherPage.cs index 980bf9e04..520c763f1 100644 --- a/src/App/Pages/Vault/VaultViewCipherPage.cs +++ b/src/App/Pages/Vault/VaultViewCipherPage.cs @@ -308,29 +308,6 @@ namespace Bit.App.Pages Table.Root.Add(NotesSection); } - // Attachments - CleanupAttachmentCells(); - if(Table.Root.Contains(AttachmentsSection)) - { - Table.Root.Remove(AttachmentsSection); - } - if(Model.ShowAttachments && (_tokenService.TokenPremium || cipher.OrganizationId != null)) - { - AttachmentsSection = new TableSection(AppResources.Attachments); - AttachmentCells = new List(); - foreach(var attachment in Model.Attachments.OrderBy(s => s.Name)) - { - var attachmentCell = new AttachmentViewCell(attachment, async () => - { - await OpenAttachmentAsync(cipher, attachment); - }); - AttachmentCells.Add(attachmentCell); - AttachmentsSection.Add(attachmentCell); - attachmentCell.InitEvents(); - } - Table.Root.Add(AttachmentsSection); - } - // Fields if(Table.Root.Contains(FieldsSection)) { @@ -361,6 +338,29 @@ namespace Bit.App.Pages Table.Root.Add(FieldsSection); } + // Attachments + CleanupAttachmentCells(); + if(Table.Root.Contains(AttachmentsSection)) + { + Table.Root.Remove(AttachmentsSection); + } + if(Model.ShowAttachments && (_tokenService.TokenPremium || cipher.OrganizationId != null)) + { + AttachmentsSection = new TableSection(AppResources.Attachments); + AttachmentCells = new List(); + foreach(var attachment in Model.Attachments.OrderBy(s => s.Name)) + { + var attachmentCell = new AttachmentViewCell(attachment, async () => + { + await OpenAttachmentAsync(cipher, attachment); + }); + AttachmentCells.Add(attachmentCell); + AttachmentsSection.Add(attachmentCell); + attachmentCell.InitEvents(); + } + Table.Root.Add(AttachmentsSection); + } + // Various types switch(cipher.Type) {