2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Handle located groups as public.

This commit is contained in:
John Preston
2019-06-21 14:27:46 +02:00
parent 6537e524b8
commit 7d585ab72f
37 changed files with 468 additions and 275 deletions

View File

@@ -58,8 +58,8 @@ rpl::producer<TextWithEntities> BioValue(not_null<UserData*> user) {
auto PlainUsernameValue(not_null<PeerData*> peer) {
return Notify::PeerUpdateValue(
peer,
Notify::PeerUpdate::Flag::UsernameChanged
peer,
Notify::PeerUpdate::Flag::UsernameChanged
) | rpl::map([peer] {
return peer->userName();
});
@@ -113,6 +113,16 @@ rpl::producer<QString> LinkValue(not_null<PeerData*> peer) {
});
}
rpl::producer<const ChannelLocation*> LocationValue(
not_null<ChannelData*> channel) {
return Notify::PeerUpdateValue(
channel,
Notify::PeerUpdate::Flag::ChannelLocation
) | rpl::map([=] {
return channel->getLocation();
});
}
rpl::producer<bool> NotificationsEnabledValue(not_null<PeerData*> peer) {
return rpl::merge(
Notify::PeerUpdateValue(