aboutsummaryrefslogtreecommitdiff
path: root/include/QuickMedia.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/QuickMedia.hpp')
-rw-r--r--include/QuickMedia.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 3e8e7c7..497f202 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -6,6 +6,7 @@
#include "Storage.hpp"
#include "Tab.hpp"
#include "MessageQueue.hpp"
+#include "AsyncTask.hpp"
#include <vector>
#include <memory>
#include <SFML/Graphics/Font.hpp>
@@ -65,8 +66,8 @@ namespace QuickMedia {
bool fetching_next_page_running = false;
int fetched_page = 0;
sf::Text search_result_text;
- std::future<FetchResult> fetch_future;
- std::future<BodyItems> next_page_future;
+ AsyncTask<FetchResult> fetch_future;
+ AsyncTask<BodyItems> next_page_future;
};
class Program {
@@ -152,9 +153,9 @@ namespace QuickMedia {
std::string manga_id_base64;
Json::Value content_storage_json;
std::unordered_set<std::string> watched_videos;
- std::future<BodyItems> search_suggestion_future;
- std::future<std::string> autocomplete_future;
- std::future<void> image_download_future;
+ AsyncTask<BodyItems> search_suggestion_future;
+ AsyncTask<std::string> autocomplete_future;
+ AsyncTask<void> image_download_future;
std::thread image_upscale_thead;
MessageQueue<CopyOp> images_to_upscale_queue;
std::vector<char> image_upscale_status;