aboutsummaryrefslogtreecommitdiff
path: root/plugins/Page.hpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-23 07:26:39 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-23 07:26:39 +0200
commit261b0263f34ffcbe439d68b2e901fd3abbfc1eaf (patch)
tree735d49f2050b52a414766675e4226f3fa8ef0d08 /plugins/Page.hpp
parent05ce6bac22d498fb2827df72f4c2b86d02826042 (diff)
Re-add creators page
Diffstat (limited to 'plugins/Page.hpp')
-rw-r--r--plugins/Page.hpp12
1 files changed, 12 insertions, 0 deletions
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<Body> 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