Skip to content

Commit

Permalink
Update LMViewModel.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
swiftuiux committed Jul 5, 2023
1 parent a947431 commit 822ce36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/d3-async-location/viewmodel/LMViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public final class LMViewModel: ILocationManagerViewModel{
private var state : LocationStreamingState = .idle

/// Check if streaming is idle
@MainActor
private var isIdle: Bool{
state == .idle
return state == .idle
}

// MARK: - Life circle
Expand Down Expand Up @@ -79,8 +80,7 @@ public final class LMViewModel: ILocationManagerViewModel{

/// Start streaming locations
public func start() async throws{

guard isIdle else{
guard await isIdle else{
throw AsyncLocationErrors.streamingProcessHasAlreadyStarted
}

Expand Down

0 comments on commit 822ce36

Please sign in to comment.