/* 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/downloads/info_downloads_provider.h" #include "info/media/info_media_widget.h" #include "info/media/info_media_list_section.h" #include "info/info_controller.h" #include "storage/storage_shared_media.h" #include "layout/layout_selection.h" namespace Info::Downloads { namespace { using namespace Media; } // namespace Provider::Provider(not_null controller) : _controller(controller) { //_controller->session().data().itemRemoved( //) | rpl::start_with_next([this](auto item) { // itemRemoved(item); //}, _lifetime); style::PaletteChanged( ) | rpl::start_with_next([=] { for (auto &layout : _layouts) { layout.second.item->invalidateCache(); } }, _lifetime); } Type Provider::type() { return Type::File; } bool Provider::hasSelectRestriction() { return false; } rpl::producer Provider::hasSelectRestrictionChanges() { return rpl::never(); } bool Provider::isPossiblyMyItem(not_null item) { return true; } std::optional Provider::fullCount() { return 0; } void Provider::restart() { } void Provider::checkPreload( QSize viewport, not_null topLayout, not_null bottomLayout, bool preloadTop, bool preloadBottom) { } void Provider::refreshViewer() { } rpl::producer<> Provider::refreshed() { return _refreshed.events(); } std::vector Provider::fillSections( not_null delegate) { return {}; } rpl::producer> Provider::layoutRemoved() { return _layoutRemoved.events(); } BaseLayout *Provider::lookupLayout(const HistoryItem *item) { return nullptr; } bool Provider::isMyItem(not_null item) { return false; } bool Provider::isAfter( not_null a, not_null b) { return a < b; } void Provider::applyDragSelection( ListSelectedMap &selected, not_null fromItem, bool skipFrom, not_null tillItem, bool skipTill) { } void Provider::saveState( not_null memento, ListScrollTopState scrollState) { } void Provider::restoreState( not_null memento, Fn restoreScrollState) { } } // namespace Info::Downloads