From ad4265cd01b4cda3823d05d66daaf997fdef4559 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 11 Apr 2022 05:32:49 +0200 Subject: 4chan: fix thumbnail size changing when going to thread and then viewing an image and going back --- TODO | 2 +- src/QuickMedia.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 13f227e..bb0ba83 100644 --- a/TODO +++ b/TODO @@ -223,4 +223,4 @@ Periodically cleanup old cache files (especially manga images, thumbnails and me Render watch progress in youtube. Set _NET_WM_USER_TIME (see sfml). Make saucenao work with encrypted images in matrix, or show an error as this is a "security" risk. -Body image cache (async image loader) should take requested size into consideration, because the same image can be requested at multiple sizes and we dont want to cache the smaller sized image for both. This happens on 4chan right now when navigating from the catalog page to a thread page and seeing OPs image. \ No newline at end of file +Body image cache (async image loader) should take requested size into consideration, because the same image can be requested at multiple sizes and we dont want to cache the smaller sized image for both. \ No newline at end of file diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index b83f64a..e8fee28 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -2030,6 +2030,8 @@ namespace QuickMedia { return false; } + AsyncImageLoader::get_instance().update(); + malloc_trim(0); idle_active_handler(); @@ -4304,6 +4306,8 @@ namespace QuickMedia { } void Program::image_board_thread_page(ImageBoardThreadPage *thread_page, Body *thread_body) { + AsyncImageLoader::get_instance().update(); + // TODO: Instead of using stage here, use different pages for each stage enum class NavigationStage { VIEWING_COMMENTS, -- cgit v1.2.3