feat: 接入拍摄任务实时订阅并完善日志与封面

This commit is contained in:
2026-11-03 09:06:38 +08:00
parent 687088326c
commit 980d16da9b
27 changed files with 1790 additions and 64 deletions
@@ -7,6 +7,10 @@ enum DroneDockShootingTaskEntry {
static func makeController(taskID: Int, order: DroneDockHomeOrder,
context: DroneDockHomeContext) -> UIViewController {
let client = NetworkServices.shared.apiClient
let realtime = DroneDockShootingRealtimeSession(taskID: taskID,
ticketService: DroneDockSocketTokenAPI(client: client),
makeTransport: { DroneDockURLSessionShootingSocket(url: APIEnvironment.current.webSocketURL) },
identityIsCurrent: { context.hasSameIdentity(as: DroneDockHomeViewController.currentContext()) })
let live = DroneDockLiveViewModel(
context: context, taskID: taskID,
service: DeviceCommandDebugPolicy.blocksLiveRequests ? nil : DroneDockLiveAPI(client: client),
@@ -19,6 +23,6 @@ enum DroneDockShootingTaskEntry {
commandService: DeviceCommandDebugPolicy.blocksFlightRequests ? nil : DroneDockCommandAPI(client: client),
resummonService: DeviceCommandDebugPolicy.blocksFlightRequests ? nil : DroneDockShootAPI(client: client),
currentContext: { DroneDockHomeViewController.currentContext() }
), liveViewModel: live)
), liveViewModel: live, realtimeSession: realtime)
}
}