Improve negative rating display.

This commit is contained in:
John Preston
2025-08-01 20:53:59 +04:00
parent 051b8c4b63
commit 667822ca08
9 changed files with 110 additions and 25 deletions
@@ -525,7 +525,11 @@ rpl::producer<Data::StarsRating> StarsRatingValue(
user,
Data::PeerUpdate::Flag::StarsRating
) | rpl::map([=] {
return user->starsRating();
auto result = user->starsRating();
if (!user->isSelf() && result.level < 0) {
result.stars = 0;
}
return result;
});
}
return rpl::single(Data::StarsRating());