From 261b0263f34ffcbe439d68b2e901fd3abbfc1eaf Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 23 Oct 2020 07:26:39 +0200 Subject: Re-add creators page --- plugins/Page.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/Page.hpp') diff --git a/plugins/Page.hpp b/plugins/Page.hpp index f65cd21..b4ea9a6 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -34,6 +34,11 @@ namespace QuickMedia { // Mutually exclusive with |is_manga_images_page|, |is_image_board_thread_page| and |is_video_page| virtual bool is_single_page() const { return false; } virtual bool is_trackable() const { return false; } + // Mutually exclusive with |is_manga_images_page|, |is_image_board_thread_page| and |is_video_page| + virtual bool is_lazy_fetch_page() const { return false; } + + // This is called both when first navigating to page and when going back to page + virtual void on_navigate_to_page() {}; bool is_tor_enabled(); std::unique_ptr create_body(); @@ -61,4 +66,11 @@ namespace QuickMedia { const std::string content_title; const std::string content_url; }; + + class LazyFetchPage : public Page { + public: + LazyFetchPage(Program *program) : Page(program) {} + bool is_lazy_fetch_page() const override { return true; } + virtual PluginResult lazy_fetch(BodyItems &result_items) = 0; + }; } \ No newline at end of file -- cgit v1.2.3