/* 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 "base/flags.h" #include #include struct ChannelLocation; namespace Data { class ForumTopic; class Thread; class Birthday; } // namespace Data namespace Main { class Session; } // namespace Main namespace Ui { class RpWidget; template class SlideWrap; } // namespace Ui namespace Storage { enum class SharedMediaType : signed char; } // namespace Storage namespace Info::Profile { inline auto ToSingleLine() { return rpl::map([](const QString &text) { return TextUtilities::SingleLine(text); }); } rpl::producer> MigratedOrMeValue( not_null peer); [[nodiscard]] rpl::producer NameValue(not_null peer); [[nodiscard]] rpl::producer TitleValue( not_null topic); [[nodiscard]] rpl::producer IconIdValue( not_null topic); [[nodiscard]] rpl::producer ColorIdValue( not_null topic); [[nodiscard]] rpl::producer PhoneValue( not_null user); [[nodiscard]] rpl::producer PhoneOrHiddenValue( not_null user); [[nodiscard]] rpl::producer UsernameValue( not_null user, bool primary = false); [[nodiscard]] rpl::producer> UsernamesValue( not_null peer); [[nodiscard]] QString UsernameUrl( not_null peer, const QString &username); [[nodiscard]] TextWithEntities AboutWithEntities( not_null peer, const QString &value); [[nodiscard]] rpl::producer AboutValue( not_null peer); struct LinkWithUrl { QString text; QString url; }; [[nodiscard]] rpl::producer LinkValue( not_null peer, bool primary = false); [[nodiscard]] rpl::producer LocationValue( not_null channel); [[nodiscard]] rpl::producer NotificationsEnabledValue( not_null peer); [[nodiscard]] rpl::producer NotificationsEnabledValue( not_null thread); [[nodiscard]] rpl::producer IsContactValue(not_null user); [[nodiscard]] rpl::producer InviteToChatButton( not_null user); [[nodiscard]] rpl::producer InviteToChatAbout( not_null user); [[nodiscard]] rpl::producer CanShareContactValue( not_null user); [[nodiscard]] rpl::producer CanAddContactValue( not_null user); [[nodiscard]] rpl::producer BirthdayValue( not_null user); [[nodiscard]] rpl::producer PersonalChannelValue( not_null user); [[nodiscard]] rpl::producer AmInChannelValue( not_null channel); [[nodiscard]] rpl::producer MembersCountValue(not_null peer); [[nodiscard]] rpl::producer PendingRequestsCountValue( not_null peer); [[nodiscard]] rpl::producer AdminsCountValue(not_null peer); [[nodiscard]] rpl::producer RestrictionsCountValue( not_null peer); [[nodiscard]] rpl::producer RestrictedCountValue( not_null channel); [[nodiscard]] rpl::producer KickedCountValue( not_null channel); [[nodiscard]] rpl::producer SharedMediaCountValue( not_null peer, MsgId topicRootId, PeerData *migrated, Storage::SharedMediaType type); [[nodiscard]] rpl::producer CommonGroupsCountValue( not_null user); [[nodiscard]] rpl::producer SimilarChannelsCountValue( not_null channel); [[nodiscard]] rpl::producer SavedSublistCountValue( not_null peer); [[nodiscard]] rpl::producer CanAddMemberValue( not_null peer); [[nodiscard]] rpl::producer FullReactionsCountValue( not_null peer); [[nodiscard]] rpl::producer CanViewParticipantsValue( not_null megagroup); enum class BadgeType; [[nodiscard]] rpl::producer BadgeValue(not_null peer); [[nodiscard]] rpl::producer EmojiStatusIdValue( not_null peer); [[nodiscard]] rpl::producer BirthdayLabelText( rpl::producer birthday); [[nodiscard]] rpl::producer BirthdayValueText( rpl::producer birthday); } // namespace Info::Profile