Fix unrated chapters displaying 0

This commit is contained in:
Amelia 2025-04-26 18:45:03 +02:00
parent f85703eca2
commit a9e2937651
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
4 changed files with 4 additions and 2 deletions

View file

@ -39,6 +39,7 @@ public class UserReviewDto
public string Username { get; set; }
public int TotalVotes { get; set; }
public float Rating { get; set; }
public bool HasBeenRated { get; set; }
public string? RawBody { get; set; }
/// <summary>
/// How many upvotes this review has gotten

View file

@ -6,6 +6,7 @@ export interface UserReview {
volumeId?: number;
chapterId?: number;
rating: number;
hasBeenRated: boolean;
score: number;
username: string;
body: string;

View file

@ -32,7 +32,7 @@
<app-external-rating [seriesId]="series.id"
[ratings]="[]"
[userRating]="rating?.rating || 0"
[hasUserRated]="rating !== undefined"
[hasUserRated]="rating !== undefined && rating.hasBeenRated"
[libraryType]="libraryType!"
[chapterId]="chapterId"
>

View file

@ -35,7 +35,7 @@
<app-external-rating [seriesId]="series.id"
[ratings]="[]"
[userRating]="rating?.rating || 0"
[hasUserRated]="rating !== undefined"
[hasUserRated]="rating !== undefined && rating.hasBeenRated"
[libraryType]="libraryType"
[chapterId]="volume.chapters[0].id"
/>