From a8d597d59e347a80b109060ec8c7a88827487f57 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 12 Feb 2022 13:42:04 +0100 Subject: Local manga: add ctrl+r to search page to mark manga as read/unread --- plugins/LocalManga.hpp | 1 + plugins/Page.hpp | 2 ++ 2 files changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/LocalManga.hpp b/plugins/LocalManga.hpp index eca5f96..e85e08b 100644 --- a/plugins/LocalManga.hpp +++ b/plugins/LocalManga.hpp @@ -33,6 +33,7 @@ namespace QuickMedia { bool reload_on_page_change() override { return true; } bool reseek_to_body_item_by_url() override { return true; } std::shared_ptr get_bookmark_body_item(BodyItem *selected_item) override; + void toggle_read(BodyItem *selected_item) override; private: std::vector manga_list; std::unordered_set finished_reading_manga; diff --git a/plugins/Page.hpp b/plugins/Page.hpp index 6864a5d..20d6000 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -71,6 +71,8 @@ namespace QuickMedia { // |selected_item| may be nullptr. virtual std::shared_ptr get_bookmark_body_item(BodyItem *selected_item) { (void)selected_item; return nullptr; } virtual bool is_bookmark_page() const { return false; } + // |selected_item| may be nullptr. + virtual void toggle_read(BodyItem *selected_item) { (void)selected_item; } virtual bool is_lazy_fetch_page() const { return false; } // Note: If submit is done without any selection, then the search term is sent as the |title| and |url|. Submit will only be sent if the input text is not empty or if an item is selected virtual bool allow_submit_no_selection() const { return false; } -- cgit v1.2.3