From 8fc5ad099b5ef536f31feb3f4baf148717f3caa6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 6 Dec 2018 14:49:26 -0500 Subject: [PATCH] name short --- src/App/Models/Page/VaultListPageModel.cs | 1 + src/App/Pages/Vault/VaultListCiphersPage.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App/Models/Page/VaultListPageModel.cs b/src/App/Models/Page/VaultListPageModel.cs index e5d676f07..604a3887b 100644 --- a/src/App/Models/Page/VaultListPageModel.cs +++ b/src/App/Models/Page/VaultListPageModel.cs @@ -187,6 +187,7 @@ namespace Bit.App.Models.Page } public string Name { get; set; } + public string NameShort => string.IsNullOrWhiteSpace(Name) || Name.Length == 0 ? "-" : Name[0].ToString(); } public class GroupingOrCipher diff --git a/src/App/Pages/Vault/VaultListCiphersPage.cs b/src/App/Pages/Vault/VaultListCiphersPage.cs index 69ce84ee2..86f8163c2 100644 --- a/src/App/Pages/Vault/VaultListCiphersPage.cs +++ b/src/App/Pages/Vault/VaultListCiphersPage.cs @@ -81,8 +81,8 @@ namespace Bit.App.Pages ItemsSource = PresentationSections, HasUnevenRows = true, GroupHeaderTemplate = new DataTemplate(() => new SectionHeaderViewCell( - nameof(Section.Name), nameof(Section.Count))), - GroupShortNameBinding = new Binding(nameof(Section.Name)), + nameof(Section.Name), nameof(Section.Count))), + GroupShortNameBinding = new Binding(nameof(Section.NameShort)), ItemTemplate = new GroupingOrCipherDataTemplateSelector(this) };