mirror of
https://github.com/rmcrackan/Libation.git
synced 2025-12-23 22:17:52 -05:00
changes per Mbucari
This commit is contained in:
@@ -130,9 +130,10 @@ namespace LibationUiBase.GridView
|
||||
|
||||
protected abstract string GetBookTags();
|
||||
protected virtual DateTime GetPurchaseDate() => LibraryBook.DateAdded;
|
||||
protected virtual DateTime? GetIncludedUntil() => LibraryBook.IncludedUntil;
|
||||
protected virtual int GetLengthInMinutes() => Book.LengthInMinutes;
|
||||
protected string GetPurchaseDateString() => GetPurchaseDate().ToString("d");
|
||||
protected string GetIncludedUntilString() => LibraryBook.IncludedUntil?.ToString("d") ?? string.Empty;
|
||||
protected string GetIncludedUntilString() => GetIncludedUntil()?.ToString("d") ?? string.Empty;
|
||||
protected string GetBookLengthString()
|
||||
{
|
||||
int bookLenMins = GetLengthInMinutes();
|
||||
@@ -213,7 +214,7 @@ namespace LibationUiBase.GridView
|
||||
nameof(Liberate) => Liberate,
|
||||
nameof(DateAdded) => DateAdded,
|
||||
nameof(IsSpatial) => IsSpatial,
|
||||
nameof(IncludedUntil) => IncludedUntil,
|
||||
nameof(IncludedUntil) => GetIncludedUntil() ?? default,
|
||||
_ => null
|
||||
};
|
||||
|
||||
|
||||
@@ -102,5 +102,6 @@ namespace LibationUiBase.GridView
|
||||
protected override string GetBookTags() => null;
|
||||
protected override int GetLengthInMinutes() => Children.Count == 0 ? 0 : Children.Sum(c => c.LibraryBook.Book.LengthInMinutes);
|
||||
protected override DateTime GetPurchaseDate() => Children.Count == 0 ? default : Children.Min(c => c.LibraryBook.DateAdded);
|
||||
protected override DateTime? GetIncludedUntil() => Children.Count == 0 ? default : Children.Min(c => c.LibraryBook.IncludedUntil);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user