2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Show only one placeholder for premium reactions.

This commit is contained in:
John Preston
2022-05-18 17:37:24 +04:00
parent 26d7abe2c9
commit 22613fc204
9 changed files with 70 additions and 27 deletions

View File

@@ -323,6 +323,15 @@ rpl::producer<bool> CanManageGroupCallValue(not_null<PeerData*> peer) {
return rpl::single(false);
}
rpl::producer<bool> AmPremiumValue(not_null<Main::Session*> session) {
return session->user()->flagsValue(
) | rpl::filter([=](UserData::Flags::Change change) {
return (change.diff & UserDataFlag::Premium);
}) | rpl::map([=] {
return session->user()->isPremium();
});
}
TimeId SortByOnlineValue(not_null<UserData*> user, TimeId now) {
if (user->isServiceUser() || user->isBot()) {
return -1;