File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Examples/CaseStudies/SwiftUICaseStudies Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import ComposableArchitecture
2
+ import ReactiveSwift
2
3
import SwiftUI
3
4
4
5
private var readMe = """
@@ -27,7 +28,7 @@ enum RefreshableAction: Equatable {
27
28
28
29
struct RefreshableEnvironment {
29
30
var fact : FactClient
30
- var mainQueue : AnySchedulerOf < DispatchQueue >
31
+ var mainQueue : DateScheduler
31
32
}
32
33
33
34
let refreshableReducer = Reducer<
@@ -65,7 +66,7 @@ let refreshableReducer = Reducer<
65
66
state. fact = nil
66
67
state. isLoading = true
67
68
return environment. fact. fetch ( state. count)
68
- . delay ( for : . seconds ( 2 ) , scheduler : environment. mainQueue. animation ( ) )
69
+ . delay ( 2 , on : environment. mainQueue. animation ( ) )
69
70
. catchToEffect ( )
70
71
. map ( RefreshableAction . factResponse)
71
72
. cancellable ( id: CancelId ( ) )
@@ -113,7 +114,7 @@ let refreshableReducer = Reducer<
113
114
reducer: refreshableReducer,
114
115
environment: . init(
115
116
fact: . live,
116
- mainQueue: . main
117
+ mainQueue: QueueScheduler . main
117
118
)
118
119
)
119
120
)
You can’t perform that action at this time.
0 commit comments