/* 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/unique_qptr.h" namespace Ui { namespace Menu { class ItemBase; } // namespace Menu class PopupMenu; struct WhoReadParticipant { QString name; QString reaction; QImage userpicSmall; QImage userpicLarge; std::pair userpicKey = {}; uint64 id = 0; static constexpr auto kMaxSmallUserpics = 3; }; bool operator==(const WhoReadParticipant &a, const WhoReadParticipant &b); bool operator!=(const WhoReadParticipant &a, const WhoReadParticipant &b); enum class WhoReadType { Seen, Listened, Watched, Reacted, }; struct WhoReadContent { std::vector participants; WhoReadType type = WhoReadType::Seen; QString singleReaction; int fullReactionsCount = 0; int fullReadCount = 0; bool unknown = false; }; [[nodiscard]] base::unique_qptr WhoReactedContextAction( not_null menu, rpl::producer content, Fn participantChosen, Fn showAllChosen); class WhoReactedListMenu final { public: WhoReactedListMenu( Fn participantChosen, Fn showAllChosen); void clear(); void populate( not_null menu, const WhoReadContent &content, Fn refillTopActions = nullptr); private: class EntryAction; const Fn _participantChosen; const Fn _showAllChosen; std::vector> _actions; }; } // namespace Ui