/* 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 "data/data_boosts.h" #include "ui/widgets/scroll_area.h" #include "ui/wrap/vertical_layout.h" namespace Ui { class Show; } // namespace Ui namespace Info { class Controller; } // namespace Info namespace Info::Boosts { class Memento; class InnerWidget final : public Ui::VerticalLayout { public: struct ShowRequest final { }; InnerWidget( QWidget *parent, not_null controller, not_null peer); [[nodiscard]] not_null peer() const; [[nodiscard]] rpl::producer scrollToRequests() const; [[nodiscard]] rpl::producer showRequests() const; void showFinished(); void saveState(not_null memento); void restoreState(not_null memento); private: void load(); void fill(); not_null _controller; not_null _peer; std::shared_ptr _show; Data::BoostStatus _state; rpl::event_stream _scrollToRequests; rpl::event_stream _showRequests; rpl::event_stream<> _showFinished; rpl::event_stream _loaded; }; } // namespace Info::Boosts