mirror of
https://github.com/bitwarden/mobile
synced 2025-12-28 06:03:40 +00:00
consolidating section header models
This commit is contained in:
@@ -183,30 +183,25 @@ namespace Bit.App.Models.Page
|
||||
public string Name { get; set; } = AppResources.FolderNone;
|
||||
}
|
||||
|
||||
public class NameGroup : List<Cipher>
|
||||
public class Section<T> : List<T>
|
||||
{
|
||||
public NameGroup(string nameGroup, List<Cipher> ciphers)
|
||||
public Section(List<T> groupItems, string name, bool doUpper = true)
|
||||
{
|
||||
Name = nameGroup.ToUpperInvariant();
|
||||
AddRange(ciphers);
|
||||
AddRange(groupItems);
|
||||
|
||||
if(doUpper)
|
||||
{
|
||||
Name = name.ToUpperInvariant();
|
||||
}
|
||||
else
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
public class Section : List<Grouping>
|
||||
{
|
||||
public Section(List<Grouping> groupings, string name)
|
||||
{
|
||||
AddRange(groupings);
|
||||
Name = name.ToUpperInvariant();
|
||||
ItemCount = groupings.Count;
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
public int ItemCount { get; set; }
|
||||
}
|
||||
|
||||
public class Grouping
|
||||
{
|
||||
public Grouping(string name, int count)
|
||||
@@ -239,16 +234,5 @@ namespace Bit.App.Models.Page
|
||||
public bool Folder { get; set; }
|
||||
public bool Collection { get; set; }
|
||||
}
|
||||
|
||||
public class AutofillGrouping : List<AutofillCipher>
|
||||
{
|
||||
public AutofillGrouping(List<AutofillCipher> logins, string name)
|
||||
{
|
||||
AddRange(logins);
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user