/* This file is part of Telegram Desktop, the official desktop application for the Telegram messaging service. For license and copyright information please follow this link: https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #pragma once #include #include #include "observer_peer.h" namespace Ui { class RpWidget; template class SlideWrap; } // namespace Ui namespace Storage { enum class SharedMediaType : signed char; } // namespace Storage namespace Info { namespace Profile { inline auto ToSingleLine() { return rpl::map([](const QString &text) { return TextUtilities::SingleLine(text); }); } inline auto WithEmptyEntities() { return rpl::map([](QString &&text) { return TextWithEntities{ std::move(text), {} }; }); } inline auto ToUpperValue() { return rpl::map([](QString &&text) { return std::move(text).toUpper(); }); } rpl::producer NameValue(not_null peer); rpl::producer PhoneValue(not_null user); rpl::producer BioValue(not_null user); rpl::producer UsernameValue(not_null user); rpl::producer AboutValue(not_null peer); rpl::producer LinkValue(not_null peer); rpl::producer NotificationsEnabledValue(not_null peer); rpl::producer IsContactValue(not_null user); rpl::producer CanInviteBotToGroupValue(not_null user); rpl::producer CanShareContactValue(not_null user); rpl::producer CanAddContactValue(not_null user); rpl::producer AmInChannelValue(not_null channel); rpl::producer MembersCountValue(not_null peer); rpl::producer AdminsCountValue(not_null peer); rpl::producer RestrictedCountValue(not_null channel); rpl::producer KickedCountValue(not_null channel); rpl::producer SharedMediaCountValue( not_null peer, PeerData *migrated, Storage::SharedMediaType type); rpl::producer CommonGroupsCountValue(not_null user); rpl::producer CanAddMemberValue(not_null peer); rpl::producer VerifiedValue(not_null peer); rpl::producer FeedChannelsCountValue(not_null feed); } // namespace Profile } // namespace Info