2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Display verified badge in the info.

This commit is contained in:
John Preston
2017-11-06 18:13:56 +04:00
parent 230c83d218
commit 3fe12f1249
5 changed files with 64 additions and 9 deletions

View File

@@ -214,5 +214,17 @@ rpl::producer<bool> CanAddMemberValue(
return rpl::single(false);
}
rpl::producer<bool> VerifiedValue(
not_null<PeerData*> peer) {
if (auto user = peer->asUser()) {
return Data::PeerFlagValue(user, MTPDuser::Flag::f_verified);
} else if (auto channel = peer->asChannel()) {
return Data::PeerFlagValue(
channel,
MTPDchannel::Flag::f_verified);
}
return rpl::single(false);
}
} // namespace Profile
} // namespace Info