aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-21 14:46:48 +0200
committerdec05eba <dec05eba@protonmail.com>2021-07-21 14:46:48 +0200
commita76dabb12734154177a78033324b40365e7c6f21 (patch)
treedab1d6b997ba283dfcc7f9dd12adee96dd631dc2 /plugins
parent3c16cb376669e4ae500d22529b40112c761088c0 (diff)
Fix freeze on search reset in manga combined plugin. Fix multithreading issues in AsyncTask
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MangaCombined.hpp1
-rw-r--r--plugins/Page.hpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/MangaCombined.hpp b/plugins/MangaCombined.hpp
index 5dc4850..dafc884 100644
--- a/plugins/MangaCombined.hpp
+++ b/plugins/MangaCombined.hpp
@@ -23,6 +23,7 @@ namespace QuickMedia {
PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override;
PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override;
sf::Vector2i get_thumbnail_max_size() override { return sf::Vector2i(101, 141); };
+ void cancel_operation() override;
private:
std::vector<MangaPlugin> search_pages;
std::vector<MangaCombinedSearchThread> search_threads; // TODO: Use async task pool
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 35e778b..07d4e0d 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -57,6 +57,7 @@ namespace QuickMedia {
// This is called both when first navigating to page and when going back to page
virtual void on_navigate_to_page(Body *body) { (void)body; }
+ virtual void cancel_operation() {}
std::unique_ptr<Body> create_body(bool plain_text_list = false, bool prefer_card_view = false);
std::unique_ptr<SearchBar> create_search_bar(const std::string &placeholder_text, int search_delay);