mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +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:
@@ -171,11 +171,11 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
.weakAssign(to: \.state.isKnockingEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$liveLocationSharingTimeoutDatesByRoomID
|
||||
appSettings.$liveLocationSharingSessionsByRoomID
|
||||
.receive(on: DispatchQueue.main)
|
||||
.sink { [weak self] timeoutDatesByRoomID in
|
||||
.sink { [weak self] sessionsByRoomID in
|
||||
guard let self else { return }
|
||||
state.isSharingLiveLocation = timeoutDatesByRoomID.keys.contains(roomProxy.id)
|
||||
state.isSharingLiveLocation = sessionsByRoomID.keys.contains(roomProxy.id)
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user