/* 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 */ #include "info/bot/earn/info_earn_inner_widget.h" #include "data/data_user.h" #include "info/bot/earn/info_earn_widget.h" #include "info/info_controller.h" namespace Info::BotEarn { namespace { } // namespace InnerWidget::InnerWidget( QWidget *parent, not_null controller, not_null peer) : VerticalLayout(parent) , _controller(controller) , _peer(peer) , _show(controller->uiShow()) { } void InnerWidget::load() { } void InnerWidget::fill() { } void InnerWidget::saveState(not_null memento) { memento->setState(base::take(_state)); } void InnerWidget::restoreState(not_null memento) { _state = memento->state(); if (_state) { fill(); } else { load(); } Ui::RpWidget::resizeToWidth(width()); } rpl::producer InnerWidget::scrollToRequests() const { return _scrollToRequests.events(); } auto InnerWidget::showRequests() const -> rpl::producer { return _showRequests.events(); } void InnerWidget::showFinished() { _showFinished.fire({}); } void InnerWidget::setInnerFocus() { _focusRequested.fire({}); } not_null InnerWidget::peer() const { return _peer; } } // namespace Info::BotEarn