Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SDWebImageSwiftUI/Classes/ImageManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import SDWebImage
/// You can use `@ObservedObject` to associate each instance of manager to your View type, which update your view's body from SwiftUI framework when image was loaded.
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
public final class ImageManager : ObservableObject {
/// Explicit publisher: the synthesized one looks itself up in a global table on every access
public let objectWillChange = ObservableObjectPublisher()

/// loaded image, note when progressive loading, this will published multiple times with different partial image
public var image: PlatformImage? {
didSet {
Expand Down
3 changes: 3 additions & 0 deletions SDWebImageSwiftUI/Classes/Indicator/Indicator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public struct Indicator<T> where T : View {
/// A observable model to report indicator loading status
@available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *)
public class IndicatorStatus : ObservableObject {
/// Explicit publisher: the synthesized one looks itself up in a global table on every access
public let objectWillChange = ObservableObjectPublisher()

/// whether indicator is loading or not
var isLoading: Bool = false {
didSet {
Expand Down
Loading