Preserve "expanded" status when updating library
This commit is contained in:
parent
fd16e97632
commit
56de1e7659
@ -34,6 +34,7 @@ namespace LibationUiBase.GridView
|
|||||||
#region Model properties exposed to the view
|
#region Model properties exposed to the view
|
||||||
|
|
||||||
protected bool? remove = false;
|
protected bool? remove = false;
|
||||||
|
private EntryStatus _liberate;
|
||||||
private string _purchasedate;
|
private string _purchasedate;
|
||||||
private string _length;
|
private string _length;
|
||||||
private LastDownloadStatus _lastDownload;
|
private LastDownloadStatus _lastDownload;
|
||||||
@ -50,7 +51,7 @@ namespace LibationUiBase.GridView
|
|||||||
private Rating _myRating;
|
private Rating _myRating;
|
||||||
|
|
||||||
public abstract bool? Remove { get; set; }
|
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 PurchaseDate { get => _purchasedate; protected set => RaiseAndSetIfChanged(ref _purchasedate, value); }
|
||||||
public string Length { get => _length; protected set => RaiseAndSetIfChanged(ref _length, value); }
|
public string Length { get => _length; protected set => RaiseAndSetIfChanged(ref _length, value); }
|
||||||
public LastDownloadStatus LastDownload { get => _lastDownload; protected set => RaiseAndSetIfChanged(ref _lastDownload, value); }
|
public LastDownloadStatus LastDownload { get => _lastDownload; protected set => RaiseAndSetIfChanged(ref _lastDownload, value); }
|
||||||
@ -98,7 +99,10 @@ namespace LibationUiBase.GridView
|
|||||||
|
|
||||||
LibraryBook = libraryBook;
|
LibraryBook = libraryBook;
|
||||||
|
|
||||||
|
var expanded = Liberate?.Expanded ?? false;
|
||||||
Liberate = TStatus.Create(libraryBook);
|
Liberate = TStatus.Create(libraryBook);
|
||||||
|
Liberate.Expanded = expanded;
|
||||||
|
|
||||||
Title = Book.Title;
|
Title = Book.Title;
|
||||||
Series = Book.SeriesNames();
|
Series = Book.SeriesNames();
|
||||||
Length = GetBookLengthString();
|
Length = GetBookLengthString();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user