Skip to content

Commit df60030

Browse files
committed
Add comments about imageManager status, since it's complicated now
1 parent 4b8d5cd commit df60030

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

SDWebImageSwiftUI/Classes/ImageManager.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ import SwiftUI
1010
import SDWebImage
1111

1212
class ImageManager : ObservableObject {
13-
@Published var image: PlatformImage?
14-
@Published var isLoading: Bool = false
15-
@Published var progress: CGFloat = 0
13+
@Published var image: PlatformImage? // loaded image, note when progressive loading, this will published multiple times with different partial image
14+
@Published var isLoading: Bool = false // whether network is loading or cache is querying
15+
@Published var progress: CGFloat = 0 // network progress
1616

1717
var manager = SDWebImageManager.shared
1818
weak var currentOperation: SDWebImageOperation? = nil
19-
var isFinished: Bool = false
20-
var isIncremental: Bool = false
19+
var isFinished: Bool = false // true means request end, load() do nothing
20+
var isIncremental: Bool = false // true means during incremental loading
2121

2222
var url: URL?
2323
var options: SDWebImageOptions

0 commit comments

Comments
 (0)