/* 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 "api/api_common.h" #include "data/data_poll.h" class History; namespace Ui { class RpWidget; class GenericBox; } // namespace Ui namespace Data { class Folder; class Session; } // namespace Data namespace Dialogs { class MainList; } // namespace Dialogs namespace Window { class Controller; class SessionController; class SessionNavigation; enum class PeerMenuSource { ChatsList, History, Profile, ScheduledSection, }; using PeerMenuCallback = Fn handler)>; void FillPeerMenu( not_null controller, not_null peer, FilterId filterId, const PeerMenuCallback &addAction, PeerMenuSource source); void FillFolderMenu( not_null controller, not_null folder, const PeerMenuCallback &addAction, PeerMenuSource source); void PeerMenuAddMuteAction( not_null peer, const PeerMenuCallback &addAction); void MenuAddMarkAsReadAllChatsAction( not_null data, const PeerMenuCallback &addAction); void MenuAddMarkAsReadChatListAction( Fn()> &&list, const PeerMenuCallback &addAction); void PeerMenuExportChat(not_null peer); void PeerMenuDeleteContact(not_null user); void PeerMenuShareContactBox( not_null navigation, not_null user); void PeerMenuAddChannelMembers( not_null navigation, not_null channel); //void PeerMenuUngroupFeed(not_null feed); // #feed void PeerMenuCreatePoll( not_null controller, not_null peer, PollData::Flags chosen = PollData::Flags(), PollData::Flags disabled = PollData::Flags(), Api::SendType sendType = Api::SendType::Normal); struct ClearChat { }; struct ClearReply { FullMsgId replyId; }; void PeerMenuBlockUserBox( not_null box, not_null window, not_null peer, std::variant suggestReport, std::variant suggestClear); void PeerMenuUnblockUserWithBotRestart(not_null user); void ToggleHistoryArchived(not_null history, bool archived); Fn ClearHistoryHandler(not_null peer); Fn DeleteAndLeaveHandler(not_null peer); QPointer ShowForwardMessagesBox( not_null navigation, MessageIdsList &&items, FnMut &&successCallback = nullptr); QPointer ShowSendNowMessagesBox( not_null navigation, not_null history, MessageIdsList &&items, FnMut &&successCallback = nullptr); } // namespace Window