模块化 AppStore 并完善素材管理与个人空间设置。
将会话、权限、位置、收款与排队存储拆分为独立模块,同步更新各 ViewModel 与单元测试,并补充素材管理 UI 与个人空间设置交互。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -164,7 +164,7 @@ final class WildPhotographerReportListViewController: BaseViewController {
|
||||
}
|
||||
|
||||
private var currentScenicId: Int? {
|
||||
let scenicId = AppStore.shared.currentScenicId
|
||||
let scenicId = AppStore.shared.session.currentScenicId
|
||||
return scenicId > 0 ? scenicId : nil
|
||||
}
|
||||
}
|
||||
|
||||
@ -556,8 +556,8 @@ final class WildPhotographerReportSubmitViewController: BaseViewController {
|
||||
await viewModel.submitReport(
|
||||
api: api,
|
||||
uploader: uploader,
|
||||
scenicId: AppStore.shared.currentScenicId,
|
||||
scenicName: AppStore.shared.currentScenicName
|
||||
scenicId: AppStore.shared.session.currentScenicId,
|
||||
scenicName: AppStore.shared.session.currentScenicName
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,8 +34,8 @@ final class WildReportRiskMapViewController: BaseViewController {
|
||||
init(
|
||||
api: any WildPhotographerReportServing = NetworkServices.shared.wildPhotographerReportAPI,
|
||||
locationProvider: any LocationProviding = LocationProvider.shared,
|
||||
scenicIdProvider: @escaping () -> Int = { AppStore.shared.currentScenicId },
|
||||
scenicNameProvider: @escaping () -> String = { AppStore.shared.currentScenicName }
|
||||
scenicIdProvider: @escaping () -> Int = { AppStore.shared.session.currentScenicId },
|
||||
scenicNameProvider: @escaping () -> String = { AppStore.shared.session.currentScenicName }
|
||||
) {
|
||||
self.viewModel = WildReportRiskMapViewModel()
|
||||
self.api = api
|
||||
|
||||
@ -343,7 +343,7 @@ final class WildReportSupplementEvidenceViewController: BaseViewController {
|
||||
await viewModel.submit(
|
||||
api: api,
|
||||
uploader: uploader,
|
||||
scenicId: AppStore.shared.currentScenicId
|
||||
scenicId: AppStore.shared.session.currentScenicId
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user