/* 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/object_ptr.h" class ChannelData; namespace Main { class Session; } // namespace Main namespace Ui { struct BoostCounters; struct BoostFeatures; class BoxContent; class RpWidget; } // namespace Ui struct TakenBoostSlot { int id = 0; TimeId expires = 0; PeerId peerId = 0; TimeId cooldown = 0; }; struct ForChannelBoostSlots { std::vector free; std::vector already; std::vector other; }; [[nodiscard]] ForChannelBoostSlots ParseForChannelBoostSlots( not_null channel, const QVector &boosts); [[nodiscard]] Ui::BoostCounters ParseBoostCounters( const MTPpremium_BoostsStatus &status); [[nodiscard]] Ui::BoostFeatures LookupBoostFeatures( not_null channel); [[nodiscard]] int BoostsForGift(not_null session); object_ptr ReassignBoostsBox( not_null to, std::vector from, Fn slots, int groups, int channels)> reassign, Fn cancel); [[nodiscard]] object_ptr CreateBoostReplaceUserpics( not_null parent, rpl::producer>> from, not_null to);