Fix #574 (for realsies this time)
This commit is contained in:
parent
6800986f25
commit
8a1b375f0d
@ -58,7 +58,7 @@ namespace LibationUiBase.GridView
|
|||||||
public abstract object BackgroundBrush { get; }
|
public abstract object BackgroundBrush { get; }
|
||||||
public object ButtonImage => GetLiberateIcon();
|
public object ButtonImage => GetLiberateIcon();
|
||||||
public string ToolTip => GetTooltip();
|
public string ToolTip => GetTooltip();
|
||||||
protected internal Book Book { get; internal set; }
|
internal Book Book { get; }
|
||||||
|
|
||||||
private DateTime lastBookUpdate;
|
private DateTime lastBookUpdate;
|
||||||
private LiberatedStatus bookStatus;
|
private LiberatedStatus bookStatus;
|
||||||
|
|||||||
@ -154,9 +154,13 @@ namespace LibationUiBase.GridView
|
|||||||
if (udi.Book.AudibleProductId != Book.AudibleProductId)
|
if (udi.Book.AudibleProductId != Book.AudibleProductId)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (udi.Book != LibraryBook.Book)
|
||||||
|
{
|
||||||
//If UserDefinedItem was changed on a different Book instance (such as when batch liberating via menus),
|
//If UserDefinedItem was changed on a different Book instance (such as when batch liberating via menus),
|
||||||
//EntryStatus' Book instance will not have the current DB state.
|
//Liberate.Book and LibraryBook.Book instances will not have the current DB state.
|
||||||
Liberate.Book = udi.Book;
|
Invoke(() => UpdateLibraryBook(new LibraryBook(udi.Book, LibraryBook.DateAdded, LibraryBook.Account)));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// UDI changed, possibly in a different context/view. Update this viewmodel. Call NotifyPropertyChanged to notify view.
|
// UDI changed, possibly in a different context/view. Update this viewmodel. Call NotifyPropertyChanged to notify view.
|
||||||
// - This method responds to tons of incidental changes. Do not persist to db from here. Committing to db must be a volitional action by the caller, not incidental. Otherwise batch changes would be impossible; we would only have slow one-offs
|
// - This method responds to tons of incidental changes. Do not persist to db from here. Committing to db must be a volitional action by the caller, not incidental. Otherwise batch changes would be impossible; we would only have slow one-offs
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user