File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Sources/d3-async-location/viewmodel Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ public final class LMViewModel: ILocationManagerViewModel{
6464 throw AsyncLocationErrors . streamingProcessHasAlreadyStarted
6565 }
6666
67- state = . streaming
67+ setState ( . streaming)
6868
6969 do {
7070 for try await coordinate in try await manager. start {
@@ -83,7 +83,7 @@ public final class LMViewModel: ILocationManagerViewModel{
8383
8484 manager. stop ( )
8585
86- state = . idle
86+ setState ( . idle)
8787
8888 #if DEBUG
8989 print ( " stop manager " )
@@ -98,4 +98,10 @@ public final class LMViewModel: ILocationManagerViewModel{
9898 private func add( _ coordinate : CLLocation ) {
9999 locations. append ( coordinate)
100100 }
101+
102+ /// Set state
103+ /// - Parameter value: Streaming state
104+ private func setState( _ value: LocationStreamingState ) {
105+ state = value
106+ }
101107}
You can’t perform that action at this time.
0 commit comments