mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Improve Live Location Sharing with reduced accuracy mode (#5461)
This commit is contained in:
@@ -2209,6 +2209,11 @@ class CLLocationManagerMock: CLLocationManagerProtocol, @unchecked Sendable {
|
||||
set(value) { underlyingDistanceFilter = value }
|
||||
}
|
||||
var underlyingDistanceFilter: CLLocationDistance!
|
||||
var pausesLocationUpdatesAutomatically: Bool {
|
||||
get { return underlyingPausesLocationUpdatesAutomatically }
|
||||
set(value) { underlyingPausesLocationUpdatesAutomatically = value }
|
||||
}
|
||||
var underlyingPausesLocationUpdatesAutomatically: Bool!
|
||||
var authorizationStatus: CLAuthorizationStatus {
|
||||
get { return underlyingAuthorizationStatus }
|
||||
set(value) { underlyingAuthorizationStatus = value }
|
||||
@@ -2325,76 +2330,6 @@ class CLLocationManagerMock: CLLocationManagerProtocol, @unchecked Sendable {
|
||||
stopUpdatingLocationCallsCount += 1
|
||||
stopUpdatingLocationClosure?()
|
||||
}
|
||||
//MARK: - startMonitoringSignificantLocationChanges
|
||||
|
||||
var startMonitoringSignificantLocationChangesUnderlyingCallsCount = 0
|
||||
var startMonitoringSignificantLocationChangesCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return startMonitoringSignificantLocationChangesUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = startMonitoringSignificantLocationChangesUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
startMonitoringSignificantLocationChangesUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
startMonitoringSignificantLocationChangesUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var startMonitoringSignificantLocationChangesCalled: Bool {
|
||||
return startMonitoringSignificantLocationChangesCallsCount > 0
|
||||
}
|
||||
var startMonitoringSignificantLocationChangesClosure: (() -> Void)?
|
||||
|
||||
func startMonitoringSignificantLocationChanges() {
|
||||
startMonitoringSignificantLocationChangesCallsCount += 1
|
||||
startMonitoringSignificantLocationChangesClosure?()
|
||||
}
|
||||
//MARK: - stopMonitoringSignificantLocationChanges
|
||||
|
||||
var stopMonitoringSignificantLocationChangesUnderlyingCallsCount = 0
|
||||
var stopMonitoringSignificantLocationChangesCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return stopMonitoringSignificantLocationChangesUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = stopMonitoringSignificantLocationChangesUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
stopMonitoringSignificantLocationChangesUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
stopMonitoringSignificantLocationChangesUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var stopMonitoringSignificantLocationChangesCalled: Bool {
|
||||
return stopMonitoringSignificantLocationChangesCallsCount > 0
|
||||
}
|
||||
var stopMonitoringSignificantLocationChangesClosure: (() -> Void)?
|
||||
|
||||
func stopMonitoringSignificantLocationChanges() {
|
||||
stopMonitoringSignificantLocationChangesCallsCount += 1
|
||||
stopMonitoringSignificantLocationChangesClosure?()
|
||||
}
|
||||
}
|
||||
class CXProviderMock: CXProviderProtocol, @unchecked Sendable {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user