2017-09-25 12:02:55 +03:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2017-09-25 12:02:55 +03:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2017-09-25 12:02:55 +03:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <rpl/producer.h>
|
|
|
|
#include <rpl/map.h>
|
|
|
|
#include "observer_peer.h"
|
|
|
|
|
2019-06-21 14:27:46 +02:00
|
|
|
struct ChannelLocation;
|
|
|
|
|
2017-09-25 12:02:55 +03:00
|
|
|
namespace Ui {
|
|
|
|
class RpWidget;
|
|
|
|
template <typename Widget>
|
|
|
|
class SlideWrap;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2018-01-11 22:33:26 +03:00
|
|
|
namespace Storage {
|
2018-03-09 21:48:47 +01:00
|
|
|
enum class SharedMediaType : signed char;
|
2018-01-11 22:33:26 +03:00
|
|
|
} // namespace Storage
|
|
|
|
|
2017-09-25 12:02:55 +03:00
|
|
|
namespace Info {
|
|
|
|
namespace Profile {
|
|
|
|
|
2017-11-07 11:21:48 +04:00
|
|
|
inline auto ToSingleLine() {
|
|
|
|
return rpl::map([](const QString &text) {
|
|
|
|
return TextUtilities::SingleLine(text);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-07-16 14:54:38 +02:00
|
|
|
rpl::producer<not_null<PeerData*>> MigratedOrMeValue(
|
|
|
|
not_null<PeerData*> peer);
|
|
|
|
|
2019-01-07 16:55:49 +04:00
|
|
|
rpl::producer<TextWithEntities> NameValue(not_null<PeerData*> peer);
|
|
|
|
rpl::producer<TextWithEntities> PhoneValue(not_null<UserData*> user);
|
2019-07-04 12:07:32 +02:00
|
|
|
rpl::producer<TextWithEntities> PhoneOrHiddenValue(not_null<UserData*> user);
|
2019-01-07 16:55:49 +04:00
|
|
|
rpl::producer<TextWithEntities> BioValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<TextWithEntities> UsernameValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<TextWithEntities> AboutValue(not_null<PeerData*> peer);
|
|
|
|
rpl::producer<QString> LinkValue(not_null<PeerData*> peer);
|
2019-06-21 14:27:46 +02:00
|
|
|
rpl::producer<const ChannelLocation*> LocationValue(
|
|
|
|
not_null<ChannelData*> channel);
|
2019-01-07 16:55:49 +04:00
|
|
|
rpl::producer<bool> NotificationsEnabledValue(not_null<PeerData*> peer);
|
|
|
|
rpl::producer<bool> IsContactValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<bool> CanInviteBotToGroupValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<bool> CanShareContactValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<bool> CanAddContactValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<bool> AmInChannelValue(not_null<ChannelData*> channel);
|
|
|
|
rpl::producer<int> MembersCountValue(not_null<PeerData*> peer);
|
|
|
|
rpl::producer<int> AdminsCountValue(not_null<PeerData*> peer);
|
2019-03-15 11:20:12 +03:00
|
|
|
rpl::producer<int> RestrictionsCountValue(not_null<PeerData*> peer);
|
2019-01-07 16:55:49 +04:00
|
|
|
rpl::producer<int> RestrictedCountValue(not_null<ChannelData*> channel);
|
|
|
|
rpl::producer<int> KickedCountValue(not_null<ChannelData*> channel);
|
2017-09-25 12:02:55 +03:00
|
|
|
rpl::producer<int> SharedMediaCountValue(
|
|
|
|
not_null<PeerData*> peer,
|
2017-10-31 22:25:22 +04:00
|
|
|
PeerData *migrated,
|
2017-09-25 12:02:55 +03:00
|
|
|
Storage::SharedMediaType type);
|
2019-01-07 16:55:49 +04:00
|
|
|
rpl::producer<int> CommonGroupsCountValue(not_null<UserData*> user);
|
|
|
|
rpl::producer<bool> CanAddMemberValue(not_null<PeerData*> peer);
|
|
|
|
rpl::producer<bool> VerifiedValue(not_null<PeerData*> peer);
|
2019-06-23 14:18:33 +02:00
|
|
|
rpl::producer<bool> ScamValue(not_null<PeerData*> peer);
|
2017-09-25 12:02:55 +03:00
|
|
|
|
2019-04-15 15:54:03 +04:00
|
|
|
//rpl::producer<int> FeedChannelsCountValue(not_null<Data::Feed*> feed); // #feed
|
2018-02-07 15:40:37 +03:00
|
|
|
|
2017-09-25 12:02:55 +03:00
|
|
|
} // namespace Profile
|
|
|
|
} // namespace Info
|