From 8e79b2e10827f42d76ec61621f2c484f9cdc2551 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 19 May 2021 23:45:27 +0200 Subject: Start on notifications run matrix delegate on main (ui) thread instead of mutex hell --- plugins/Page.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins/Page.hpp') diff --git a/plugins/Page.hpp b/plugins/Page.hpp index 78eb3c4..be6eb76 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -35,6 +35,8 @@ namespace QuickMedia { (void)result_tabs; return PluginResult::ERR; } + // Override and return false to make submit run in the main (ui) thread + virtual bool submit_is_async() { return true; } virtual bool clear_search_after_submit() { return false; } // Note: If pagination is done by fetching the next page until we get to |page|, then the "current page" should be reset everytime |search| is called. // Note: the first page is 0 @@ -53,9 +55,6 @@ 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; } - // Called periodically (every frame right now) if this page is the currently active one - virtual void update() {} - std::unique_ptr create_body(); std::unique_ptr create_search_bar(const std::string &placeholder_text, int search_delay); -- cgit v1.2.3