Skip to content

Commit 8d28ba6

Browse files
committed
RAS changes.
1 parent fdc8773 commit 8d28ba6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Examples/CaseStudies/SwiftUICaseStudies/02-Effects-Refreshable.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ComposableArchitecture
2+
import ReactiveSwift
23
import SwiftUI
34

45
private var readMe = """
@@ -27,7 +28,7 @@ enum RefreshableAction: Equatable {
2728

2829
struct RefreshableEnvironment {
2930
var fact: FactClient
30-
var mainQueue: AnySchedulerOf<DispatchQueue>
31+
var mainQueue: DateScheduler
3132
}
3233

3334
let refreshableReducer = Reducer<
@@ -65,7 +66,7 @@ let refreshableReducer = Reducer<
6566
state.fact = nil
6667
state.isLoading = true
6768
return environment.fact.fetch(state.count)
68-
.delay(for: .seconds(2), scheduler: environment.mainQueue.animation())
69+
.delay(2, on: environment.mainQueue.animation())
6970
.catchToEffect()
7071
.map(RefreshableAction.factResponse)
7172
.cancellable(id: CancelId())
@@ -113,7 +114,7 @@ let refreshableReducer = Reducer<
113114
reducer: refreshableReducer,
114115
environment: .init(
115116
fact: .live,
116-
mainQueue: .main
117+
mainQueue: QueueScheduler.main
117118
)
118119
)
119120
)

0 commit comments

Comments
 (0)