mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 23:25:45 +03:00
move fields above attachments on view
This commit is contained in:
parent
fb6e0c9eb8
commit
e6f3ad60ef
1 changed files with 23 additions and 23 deletions
|
@ -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<AttachmentViewCell>();
|
||||
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<AttachmentViewCell>();
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue