HaikuDepot: Fix list packages view

Resolves #19201

Change-Id: Iaba3a84aeb2dfafc3512ffea21bb58c548aa3dee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8504
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Andrew Lindesay 2024-10-26 14:49:48 +13:00
parent 8ece85d220
commit 55a87be02d

View File

@ -663,12 +663,15 @@ PackageRow::UpdateRating()
UserRatingInfoRef userRatingInfo = fPackage->UserRatingInfo();
UserRatingSummaryRef userRatingSummary;
float averageRating = RATING_MISSING;
if (userRatingInfo.IsSet())
userRatingSummary = userRatingInfo->Summary();
if (userRatingSummary.IsSet())
SetField(new RatingField(userRatingSummary->AverageRating()), kRatingColumn);
averageRating = userRatingSummary->AverageRating();
SetField(new RatingField(averageRating), kRatingColumn);
}