From 935a3a0308ac2ab6b16533b3cb0c343de88ce92f Mon Sep 17 00:00:00 2001 From: RickyRister Date: Thu, 3 Jul 2025 01:05:49 -0700 Subject: [PATCH] emit cachedImageHit first --- .../client/ui/picture_loader/picture_loader_worker_work.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp b/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp index 7d16bd2fe..cafb829d6 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp @@ -98,12 +98,11 @@ void PictureLoaderWorkerWork::handleNetworkReply(QNetworkReply *reply) if (reply->error()) { handleFailedReply(reply); } else { - handleSuccessfulReply(reply); - - // If we hit a cached image, we get to make another request for free. if (reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool()) { emit cachedImageHit(); } + + handleSuccessfulReply(reply); } reply->deleteLater();