We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a947431 commit 822ce36Copy full SHA for 822ce36
Sources/d3-async-location/viewmodel/LMViewModel.swift
@@ -33,8 +33,9 @@ public final class LMViewModel: ILocationManagerViewModel{
33
private var state : LocationStreamingState = .idle
34
35
/// Check if streaming is idle
36
+ @MainActor
37
private var isIdle: Bool{
- state == .idle
38
+ return state == .idle
39
}
40
41
// MARK: - Life circle
@@ -79,8 +80,7 @@ public final class LMViewModel: ILocationManagerViewModel{
79
80
81
/// Start streaming locations
82
public func start() async throws{
-
83
- guard isIdle else{
+ guard await isIdle else{
84
throw AsyncLocationErrors.streamingProcessHasAlreadyStarted
85
86
0 commit comments