Fixed a bug with user reviews (#2677)
This commit is contained in:
parent
828d62dfe9
commit
a9ab84803e
5 changed files with 22 additions and 10 deletions
|
@ -3,7 +3,7 @@ import {UserReview} from "../../_single-module/review-card/user-review";
|
|||
import {Rating} from "../rating";
|
||||
|
||||
export interface SeriesDetailPlus {
|
||||
recommendations: Recommendation;
|
||||
recommendations?: Recommendation;
|
||||
reviews: Array<UserReview>;
|
||||
ratings: Array<Rating>;
|
||||
ratings?: Array<Rating>;
|
||||
}
|
||||
|
|
|
@ -587,7 +587,7 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
});
|
||||
this.setContinuePoint();
|
||||
|
||||
if (KavitaPlusSupportedLibraryTypes.includes(this.libraryType) && loadExternal) {
|
||||
if (loadExternal) {
|
||||
this.loadPlusMetadata(this.seriesId);
|
||||
}
|
||||
|
||||
|
@ -701,10 +701,16 @@ export class SeriesDetailComponent implements OnInit, AfterContentChecked {
|
|||
|
||||
// Reviews
|
||||
this.reviews = [...data.reviews];
|
||||
this.ratings = [...data.ratings];
|
||||
if (data.ratings) {
|
||||
this.ratings = [...data.ratings];
|
||||
}
|
||||
|
||||
|
||||
// Recommendations
|
||||
this.combinedRecs = [...data.recommendations.ownedSeries, ...data.recommendations.externalSeries];
|
||||
if (data.recommendations) {
|
||||
this.combinedRecs = [...data.recommendations.ownedSeries, ...data.recommendations.externalSeries];
|
||||
}
|
||||
|
||||
this.hasRecommendations = this.combinedRecs.length > 0;
|
||||
|
||||
this.cdRef.markForCheck();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue