1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 02:23:57 +00:00

label right detail cell for attachments

This commit is contained in:
Kyle Spearrin
2017-07-13 00:02:37 -04:00
parent 2f86b5c7b0
commit eec4be1845
3 changed files with 64 additions and 7 deletions

View File

@@ -261,21 +261,23 @@ namespace Bit.App.Pages
}
}
public class AttachmentViewCell : ExtendedTextCell
public class AttachmentViewCell : LabeledRightDetailCell
{
Action _clicked;
private readonly Action _tapped;
public AttachmentViewCell(VaultViewLoginPageModel.Attachment attachment, Action clickedAction)
public AttachmentViewCell(VaultViewLoginPageModel.Attachment attachment, Action tappedAction)
{
_clicked = clickedAction;
Text = attachment.Name;
Tapped += AttachmentViewCell_Tapped;
_tapped = tappedAction;
Label.Text = attachment.Name;
Detail.Text = attachment.Size;
Icon.Source = "user"; // TODO: download icon
BackgroundColor = Color.White;
Tapped += AttachmentViewCell_Tapped;
}
private void AttachmentViewCell_Tapped(object sender, EventArgs e)
{
_clicked?.Invoke();
_tapped?.Invoke();
}
}
}