mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 02:18:27 +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);
|
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
|
// Fields
|
||||||
if(Table.Root.Contains(FieldsSection))
|
if(Table.Root.Contains(FieldsSection))
|
||||||
{
|
{
|
||||||
|
@ -361,6 +338,29 @@ namespace Bit.App.Pages
|
||||||
Table.Root.Add(FieldsSection);
|
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
|
// Various types
|
||||||
switch(cipher.Type)
|
switch(cipher.Type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue