From cae43d7c8892ea9336d869b36461e50e999dbb12 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 10 Oct 2023 14:46:23 +0800 Subject: [PATCH] Try to remove the unused NSNotification object filter, do filter by ourself --- SDWebImage/Core/SDWebImageDownloader.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/Core/SDWebImageDownloader.m b/SDWebImage/Core/SDWebImageDownloader.m index 33bb937f..777349b2 100644 --- a/SDWebImage/Core/SDWebImageDownloader.m +++ b/SDWebImage/Core/SDWebImageDownloader.m @@ -556,8 +556,8 @@ didReceiveResponse:(NSURLResponse *)response self = [super init]; if (self) { _downloadOperation = downloadOperation; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadDidReceiveResponse:) name:SDWebImageDownloadReceiveResponseNotification object:downloadOperation]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadDidStop:) name:SDWebImageDownloadStopNotification object:downloadOperation]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadDidReceiveResponse:) name:SDWebImageDownloadReceiveResponseNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(downloadDidStop:) name:SDWebImageDownloadStopNotification object:nil]; } return self; }