Skip to content

Commit ea17ba0

Browse files
committed
update
1 parent 10ee076 commit ea17ba0

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Sources/d3-async-location/LocationManagerAsync.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public final class LocationManagerAsync: NSObject, CLLocationManagerDelegate, IL
7878
if await getPermission{
7979
return locations
8080
}
81-
throw LocationManagerErrors.accessIsNotAuthorized
81+
throw AsyncLocationErrors.accessIsNotAuthorized
8282
}
8383
}
8484

Sources/d3-async-location/enum/LocationManagerErrors.swift renamed to Sources/d3-async-location/enum/AsyncLocationErrors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010
/// Async locations manager errors
1111
@available(iOS 15.0, watchOS 7.0, *)
12-
public enum LocationManagerErrors: Error{
12+
public enum AsyncLocationErrors: Error{
1313

1414
///Access was denied by user
1515
case accessIsNotAuthorized

Sources/d3-async-location/viewmodel/LMViewModel.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public actor LMViewModel: ILocationManagerViewModel{
5454
public func start() async throws{
5555

5656
guard isIdle else{
57-
throw LocationManagerErrors.streamingProcessHasAlreadyStarted
57+
throw AsyncLocationErrors.streamingProcessHasAlreadyStarted
5858
}
5959

6060
state = .streaming
@@ -67,13 +67,12 @@ public actor LMViewModel: ILocationManagerViewModel{
6767
state = .idle
6868
throw error
6969
}
70-
7170
}
7271

7372
/// Start streaming locations
7473
public func stop(){
75-
state = .idle
7674
manager.stop()
75+
state = .idle
7776
}
7877

7978
// MARK: - Private

0 commit comments

Comments
 (0)