aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-06-19 04:46:27 +0200
committerdec05eba <dec05eba@protonmail.com>2022-06-19 04:46:27 +0200
commit295ab1f44b76bf88606a217fd6a014cbdf5a915d (patch)
tree665fb8f0f67e46f05a0c84157c6c01e59a7150c6 /plugins
parent42891df4c3c184b7123ba44693c489f489de10e3 (diff)
Fix submit on async reload page, fix submit on search suggestion page empty text
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Page.hpp2
-rw-r--r--plugins/Youtube.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 64c24c3..c1ca012 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -39,7 +39,7 @@ namespace QuickMedia {
virtual SearchResult search(const std::string &str, BodyItems &result_items) { (void)str; (void)result_items; return SearchResult::ERR; }
// If this returns true then |submit_suggestion| is called when submitting the selected item instead of |submit|
// and |submit| is called when submitting the response of |submit_suggestion|
- virtual bool search_is_suggestion() { return false; }
+ virtual bool search_is_suggestion(bool empty_search) { (void)empty_search; return false; }
// Return empty |result_tabs| and PluginResult::OK to do nothing; which is useful for implementing custom actions on item submit
virtual PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) {
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index dc604a9..5affe04 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -45,7 +45,7 @@ namespace QuickMedia {
public:
YoutubeSearchPage(Program *program, std::string video_id = "") : LazyFetchPage(program), video_id(std::move(video_id)) {}
const char* get_title() const override { return "Search"; }
- bool search_is_suggestion() override { return true; }
+ bool search_is_suggestion(bool empty_search) override { return !empty_search; }
bool search_is_filter() override { return false; }
SearchResult search(const std::string &str, BodyItems &result_items) override;
PluginResult get_page(const std::string &str, int page, BodyItems &result_items) override;