完善首页权限申请流程与队列播报体验。
对齐 Android 无权限强制弹窗、角色下拉与申请页交互,补充 UIButton configuration 适配,并增强景区排队 TTS 与相关单元测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -78,6 +78,21 @@ final class HomeViewModel {
|
||||
needsPermissionReload = true
|
||||
}
|
||||
|
||||
/// 查询待审核记录并决定进入申请页或审核状态页。
|
||||
func resolvePermissionApplyDestination(api: HomeAPI) async -> PermissionApplyDestination {
|
||||
do {
|
||||
let pendingList = try await api.roleApplyPending()
|
||||
guard let first = pendingList.first,
|
||||
first.status == PermissionApplyPendingStatus.reviewing
|
||||
|| first.status == PermissionApplyPendingStatus.rejected else {
|
||||
return .apply
|
||||
}
|
||||
return .status(applyCode: first.code)
|
||||
} catch {
|
||||
return .apply
|
||||
}
|
||||
}
|
||||
|
||||
/// 按需重新拉取权限。
|
||||
func reloadIfNeeded(api: HomeAPI) async {
|
||||
locationStateStore.restoreStateIfNeeded()
|
||||
|
||||
Reference in New Issue
Block a user