From ed9b95f8f1ac7d5807a6d17cf59c639475f6d73a Mon Sep 17 00:00:00 2001 From: "seongho.hong" Date: Thu, 12 Sep 2019 19:14:57 +0900 Subject: [PATCH] Fix object will change --- SDWebImageSwiftUI/Classes/ImageManager.swift | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SDWebImageSwiftUI/Classes/ImageManager.swift b/SDWebImageSwiftUI/Classes/ImageManager.swift index efad3a4..58a8c63 100644 --- a/SDWebImageSwiftUI/Classes/ImageManager.swift +++ b/SDWebImageSwiftUI/Classes/ImageManager.swift @@ -11,18 +11,15 @@ import Combine import SDWebImage class ImageManager : ObservableObject { - var willChange = PassthroughSubject() - var didChange = PassthroughSubject() + + var objectWillChange = PassthroughSubject() private var manager = SDWebImageManager.shared private weak var currentOperation: SDWebImageOperation? = nil var image: Image? { willSet { - willChange.send(self) - } - didSet { - didChange.send(self) + objectWillChange.send(self) } }