Improve classic and chardonnay rating editor simmilarity

This commit is contained in:
Michael Bucari-Tovo 2022-12-31 10:02:30 -07:00
parent c9497ef39e
commit 874bf9e7c0
14 changed files with 233 additions and 178 deletions

View file

@ -68,7 +68,9 @@ namespace LibationAvalonia.ViewModels
Title = Book.Title;
Series = Book.SeriesNames();
_myRating = Book.UserDefinedItem.Rating;
//Ratings are changed using Update(), which is a problem for Avalonia data bindings because
//the reference doesn't change. Clone the rating so that it updates within Avalonia properly.
_myRating = new Rating(Book.UserDefinedItem.Rating.OverallRating, Book.UserDefinedItem.Rating.PerformanceRating, Book.UserDefinedItem.Rating.StoryRating);
ProductRating = Book.Rating?.ToStarString()?.DefaultIfNullOrWhiteSpace("");
Authors = Book.AuthorNames();
Narrators = Book.NarratorNames();