From 56de1e7659f6c44636429ac41d0ebb09f79b885c Mon Sep 17 00:00:00 2001 From: MBucari Date: Fri, 17 Mar 2023 17:47:27 -0600 Subject: [PATCH] Preserve "expanded" status when updating library --- Source/LibationUiBase/GridView/GridEntry[TStatus].cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/LibationUiBase/GridView/GridEntry[TStatus].cs b/Source/LibationUiBase/GridView/GridEntry[TStatus].cs index 0502b3f6..2e5c08b0 100644 --- a/Source/LibationUiBase/GridView/GridEntry[TStatus].cs +++ b/Source/LibationUiBase/GridView/GridEntry[TStatus].cs @@ -34,6 +34,7 @@ namespace LibationUiBase.GridView #region Model properties exposed to the view protected bool? remove = false; + private EntryStatus _liberate; private string _purchasedate; private string _length; private LastDownloadStatus _lastDownload; @@ -50,7 +51,7 @@ namespace LibationUiBase.GridView private Rating _myRating; public abstract bool? Remove { get; set; } - public EntryStatus Liberate { get; private set; } + public EntryStatus Liberate { get => _liberate; private set => RaiseAndSetIfChanged(ref _liberate, value); } public string PurchaseDate { get => _purchasedate; protected set => RaiseAndSetIfChanged(ref _purchasedate, value); } public string Length { get => _length; protected set => RaiseAndSetIfChanged(ref _length, value); } public LastDownloadStatus LastDownload { get => _lastDownload; protected set => RaiseAndSetIfChanged(ref _lastDownload, value); } @@ -98,7 +99,10 @@ namespace LibationUiBase.GridView LibraryBook = libraryBook; + var expanded = Liberate?.Expanded ?? false; Liberate = TStatus.Create(libraryBook); + Liberate.Expanded = expanded; + Title = Book.Title; Series = Book.SeriesNames(); Length = GetBookLengthString();