From 35eb98eb3bd7c41a7edf2d6c337ec8078ba1cb86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Wed, 11 Jun 2025 17:16:43 +0200 Subject: [PATCH] Save redirect cache on destruction. --- .../src/client/ui/picture_loader/picture_loader_worker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp index 8c43b795b..fdc815f4d 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp @@ -63,6 +63,7 @@ PictureLoaderWorker::PictureLoaderWorker() PictureLoaderWorker::~PictureLoaderWorker() { + saveRedirectCache(); pictureLoaderThread->deleteLater(); } @@ -145,7 +146,7 @@ void PictureLoaderWorker::imageLoadedSuccessfully(CardInfoPtr card, const QImage void PictureLoaderWorker::cacheRedirect(const QUrl &originalUrl, const QUrl &redirectUrl) { redirectCache[originalUrl] = qMakePair(redirectUrl, QDateTime::currentDateTimeUtc()); - saveRedirectCache(); + // saveRedirectCache(); } QUrl PictureLoaderWorker::getCachedRedirect(const QUrl &originalUrl) const