Skip to content

Commit e4d65d7

Browse files
committed
Use @Published in SwiftUISubscription.
1 parent b6beb6b commit e4d65d7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Loop/Public/SwiftUI/SwiftUISubscription.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import ReactiveSwift
66

77
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
88
internal final class SwiftUISubscription<State, Event>: ObservableObject {
9-
let objectWillChange = ObservableObjectPublisher()
10-
var latestValue: State!
9+
@Published var latestValue: State!
1110
private(set) var hasStarted = false
1211

1312
private var disposable: Disposable?
@@ -28,7 +27,6 @@ internal final class SwiftUISubscription<State, Event>: ObservableObject {
2827
.startWithValues { [weak self] state in
2928
guard let self = self else { return }
3029
self.latestValue = state
31-
self.objectWillChange.send()
3230
}
3331
}
3432
}

0 commit comments

Comments
 (0)