/* 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 #include "ui/rp_widget.h" namespace Window { class Controller; } // namespace Window namespace Ui { class VerticalLayout; template class SlideWrap; struct ScrollToRequest; class MultiSlideTracker; } // namespace Ui namespace Info { enum class Wrap; class Controller; namespace FeedProfile { class Memento; class Channels; class Cover; class InnerWidget final : public Ui::RpWidget { public: InnerWidget( QWidget *parent, not_null controller); void saveState(not_null memento); void restoreState(not_null memento); void setIsStackBottom(bool isStackBottom) { _isStackBottom = isStackBottom; } rpl::producer scrollToRequests() const; rpl::producer desiredHeightValue() const override; protected: int resizeGetHeight(int newWidth) override; void visibleTopBottomUpdated( int visibleTop, int visibleBottom) override; private: object_ptr setupContent(not_null parent); int countDesiredHeight() const; void updateDesiredHeight() { _desiredHeight.fire(countDesiredHeight()); } rpl::variable _isStackBottom = true; const not_null _controller; const not_null _feed; Channels *_channels = nullptr; Cover *_cover = nullptr; object_ptr _content; bool _inResize = false; rpl::event_stream _scrollToRequests; rpl::event_stream _desiredHeight; }; } // namespace FeedProfile } // namespace Info