mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
da5360c8e8
* added a new tracking mode for following a marker and the logic for switching such tracking mode * implemented the follow marker tracking mode * improved and added new tests
27 lines
922 B
Swift
27 lines
922 B
Swift
//
|
|
// Copyright 2026 Element Creations Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
|
// Please see LICENSE files in the repository root for full details.
|
|
//
|
|
|
|
import Combine
|
|
import CoreLocation
|
|
|
|
extension LiveLocationManagerMock {
|
|
struct Configuration {
|
|
var authorizationStatus: CLAuthorizationStatus = .notDetermined
|
|
var requestAlwaysAuthorizationIfPossibleReturnValue = true
|
|
}
|
|
|
|
convenience init(_ configuration: Configuration) {
|
|
self.init()
|
|
|
|
let authorizationStatusSubject = CurrentValueSubject<CLAuthorizationStatus, Never>(configuration.authorizationStatus)
|
|
authorizationStatus = .init(authorizationStatusSubject)
|
|
|
|
requestAlwaysAuthorizationIfPossibleReturnValue = configuration.requestAlwaysAuthorizationIfPossibleReturnValue
|
|
startLiveLocationRoomIDDurationReturnValue = .success(())
|
|
}
|
|
}
|