feat: 统一机巢加载体验并对齐到达态界面
工作台、准备页、任务首次读取和景区空境库复用应用通用 Loading;到达态按 Web 展示,保留倒计时及手动开拍权限。新增图传几何诊断,不改变 Fit 渲染或设备连接行为。 验证:App 与测试包无签名 build-for-testing 编译通过,git diff --check 通过。iPhone 11 当前 unavailable,真机回归待设备重连后执行。
This commit is contained in:
@@ -2,7 +2,7 @@ import SnapKit
|
||||
import UIKit
|
||||
|
||||
/// 正式机巢首页:朱工提供设备,张工提供订单与今日统计。
|
||||
final class DroneDockHomeViewController: BaseViewController {
|
||||
final class DroneDockHomeViewController: GlobalLoadingPageViewController {
|
||||
/// 与演示数据源隔离的首页状态。
|
||||
let viewModel: DroneDockHomeViewModel
|
||||
private let paymentControllerFactory: (() -> UIViewController)?
|
||||
@@ -117,6 +117,7 @@ final class DroneDockHomeViewController: BaseViewController {
|
||||
loadMoreTask?.cancel()
|
||||
isLoadingOrdersPage = false
|
||||
isRefreshing = true
|
||||
setPageLoading(viewModel.response == nil && viewModel.ordersResponse == nil)
|
||||
refreshTask = Task { @MainActor [weak self] in
|
||||
guard let self else { return }
|
||||
let isInitialLoad = self.viewModel.response == nil && self.viewModel.ordersResponse == nil
|
||||
@@ -124,6 +125,7 @@ final class DroneDockHomeViewController: BaseViewController {
|
||||
await self.viewModel.refresh()
|
||||
guard !Task.isCancelled else { return }
|
||||
self.isRefreshing = false
|
||||
self.setPageLoading(false)
|
||||
self.collectionView.refreshControl?.endRefreshing()
|
||||
self.applySnapshot(animated: true) { [weak self] in
|
||||
if isInitialLoad, let self {
|
||||
|
||||
Reference in New Issue
Block a user