aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-04-11 05:32:49 +0200
committerdec05eba <dec05eba@protonmail.com>2022-04-11 05:32:49 +0200
commitad4265cd01b4cda3823d05d66daaf997fdef4559 (patch)
tree0e7188078759fa5009986f1b5bc84014323bc261
parent08cef1dc766830825f9f25591fb70d0b360d6304 (diff)
4chan: fix thumbnail size changing when going to thread and then viewing an image and going back
-rw-r--r--TODO2
-rw-r--r--src/QuickMedia.cpp4
2 files changed, 5 insertions, 1 deletions
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,