refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import ClawdbotKit
|
||||
import MoltbotKit
|
||||
import CoreLocation
|
||||
import Foundation
|
||||
|
||||
@@ -30,7 +30,7 @@ final class LocationService: NSObject, CLLocationManagerDelegate {
|
||||
return .fullAccuracy
|
||||
}
|
||||
|
||||
func ensureAuthorization(mode: ClawdbotLocationMode) async -> CLAuthorizationStatus {
|
||||
func ensureAuthorization(mode: MoltbotLocationMode) async -> CLAuthorizationStatus {
|
||||
guard CLLocationManager.locationServicesEnabled() else { return .denied }
|
||||
|
||||
let status = self.manager.authorizationStatus
|
||||
@@ -53,8 +53,8 @@ final class LocationService: NSObject, CLLocationManagerDelegate {
|
||||
}
|
||||
|
||||
func currentLocation(
|
||||
params: ClawdbotLocationGetParams,
|
||||
desiredAccuracy: ClawdbotLocationAccuracy,
|
||||
params: MoltbotLocationGetParams,
|
||||
desiredAccuracy: MoltbotLocationAccuracy,
|
||||
maxAgeMs: Int?,
|
||||
timeoutMs: Int?) async throws -> CLLocation
|
||||
{
|
||||
@@ -93,7 +93,7 @@ final class LocationService: NSObject, CLLocationManagerDelegate {
|
||||
try await AsyncTimeout.withTimeoutMs(timeoutMs: timeoutMs, onTimeout: { Error.timeout }, operation: operation)
|
||||
}
|
||||
|
||||
private static func accuracyValue(_ accuracy: ClawdbotLocationAccuracy) -> CLLocationAccuracy {
|
||||
private static func accuracyValue(_ accuracy: MoltbotLocationAccuracy) -> CLLocationAccuracy {
|
||||
switch accuracy {
|
||||
case .coarse:
|
||||
kCLLocationAccuracyKilometer
|
||||
|
||||
Reference in New Issue
Block a user