mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Show stars rating bar.
This commit is contained in:
@@ -518,6 +518,19 @@ bool ChannelHasSubscriptionUntilDate(ChannelData *channel) {
|
||||
return channel && channel->subscriptionUntilDate() > 0;
|
||||
}
|
||||
|
||||
rpl::producer<Data::StarsRating> StarsRatingValue(
|
||||
not_null<PeerData*> peer) {
|
||||
if (const auto user = peer->asUser()) {
|
||||
return user->session().changes().peerFlagsValue(
|
||||
user,
|
||||
Data::PeerUpdate::Flag::StarsRating
|
||||
) | rpl::map([=] {
|
||||
return user->starsRating();
|
||||
});
|
||||
}
|
||||
return rpl::single(Data::StarsRating());
|
||||
}
|
||||
|
||||
rpl::producer<QImage> PeerUserpicImageValue(
|
||||
not_null<PeerData*> peer,
|
||||
int size,
|
||||
|
||||
Reference in New Issue
Block a user