From 7ce2139650012d4c571c7e7600924853ab7032bb Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 5 Aug 2019 22:25:52 +0200 Subject: Load thumbnails in separate thread --- include/Body.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index c27ecf0..e09017d 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -4,6 +4,7 @@ #include #include #include +#include namespace QuickMedia { class BodyItem { @@ -43,6 +44,10 @@ namespace QuickMedia { sf::Text title_text; int selected_item; std::vector> items; - std::vector> item_thumbnail_textures; + std::vector> item_thumbnail_textures; + std::thread thumbnail_load_thread; + private: + std::shared_ptr load_thumbnail_from_url(const std::string &url); + bool loading_thumbnail; }; } \ No newline at end of file -- cgit v1.2.3