mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Live Location Sharing - handle server echoes (#5514)
* Track active live location sessions by ID instead of timeout. # Conflicts: # ElementX/Sources/Services/Location/LiveLocationManager.swift * implemented a system to promote starting session to active sesessions to send locations at the right time, and a system to remove a local session if it's handled by an external device. * pr suggestions --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -758,10 +758,10 @@ class JoinedRoomProxy: JoinedRoomProxyProtocol {
|
||||
await RoomLiveLocationService(liveLocationsObserver: room.liveLocationsObserver())
|
||||
}
|
||||
|
||||
func startLiveLocationShare(duration: Duration) async -> Result<Void, RoomProxyError> {
|
||||
func startLiveLocationShare(duration: Duration) async -> Result<String, RoomProxyError> {
|
||||
do {
|
||||
try await room.startLiveLocationShare(durationMillis: UInt64(duration.seconds * 1000))
|
||||
return .success(())
|
||||
let eventID = try await room.startLiveLocationShare(durationMillis: UInt64(duration.seconds * 1000))
|
||||
return .success(eventID)
|
||||
} catch {
|
||||
MXLog.error("Failed starting live location share with error: \(error)")
|
||||
return .failure(.sdkError(error))
|
||||
|
||||
@@ -200,7 +200,7 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
|
||||
func makeLiveLocationService() async -> RoomLiveLocationServiceProtocol
|
||||
|
||||
func startLiveLocationShare(duration: Duration) async -> Result<Void, RoomProxyError>
|
||||
func startLiveLocationShare(duration: Duration) async -> Result<String, RoomProxyError>
|
||||
func sendLiveLocation(geoURI: GeoURI) async -> Result<Void, RoomProxyError>
|
||||
func stopLiveLocationShare() async -> Result<Void, RoomProxyError>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user