mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -90,6 +90,16 @@ enum TimelineMediaVisibility: Decodable {
|
||||
case never
|
||||
}
|
||||
|
||||
/// Represents a server-echoed update about the current user's own beacon info state in a room.
|
||||
struct LiveLocationOwnInfoUpdate: Equatable {
|
||||
/// The room where the beacon info event was sent.
|
||||
let roomID: String
|
||||
/// The event ID of the beacon info state event.
|
||||
let eventID: String
|
||||
/// Whether the beacon is currently active (live) or has been stopped.
|
||||
let isLive: Bool
|
||||
}
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol ClientProxyProtocol: AnyObject {
|
||||
var actionsPublisher: AnyPublisher<ClientProxyAction, Never> { get }
|
||||
@@ -264,6 +274,11 @@ protocol ClientProxyProtocol: AnyObject {
|
||||
|
||||
func userIdentity(for userID: String, fallBackToServer: Bool) async -> Result<UserIdentityProxyProtocol?, ClientProxyError>
|
||||
|
||||
// MARK: - Live Location
|
||||
|
||||
/// Publishes updates about the current user's own live location beacon info state changes (start/stop) as echoed by the server.
|
||||
var liveLocationOwnInfoUpdatesPublisher: AnyPublisher<LiveLocationOwnInfoUpdate, Never> { get }
|
||||
|
||||
// MARK: - Moderation & Safety
|
||||
|
||||
func setTimelineMediaVisibility(_ value: TimelineMediaVisibility) async -> Result<Void, ClientProxyError>
|
||||
|
||||
Reference in New Issue
Block a user