优化首页位置上报体验

This commit is contained in:
2026-07-10 11:44:56 +08:00
parent c03a625409
commit df547a16dc
8 changed files with 47 additions and 11 deletions

View File

@ -183,7 +183,11 @@ final class HomeViewController: BaseViewController {
) as! HomeLocationReportCell
cell.cardView.onReportTap = { [weak self] in
guard let self else { return }
Task { await self.viewModel.manualReportLocation(api: self.homeAPI) }
Task { @MainActor in
self.showLoading()
defer { self.hideLoading() }
await self.viewModel.manualReportLocation(api: self.homeAPI)
}
}
cell.apply(
address: HomeViewModel.locationReportPromptText,