feat: finalize website i18n and language dropdown fixes for App Store submission
This commit is contained in:
@@ -395,14 +395,18 @@ public actor LivePhotoValidator {
|
|||||||
|
|
||||||
// 检查是否有错误或被取消
|
// 检查是否有错误或被取消
|
||||||
if let error = info[PHLivePhotoInfoErrorKey] as? Error {
|
if let error = info[PHLivePhotoInfoErrorKey] as? Error {
|
||||||
|
#if DEBUG
|
||||||
print("[LivePhotoValidator] requestLivePhoto error: \(error.localizedDescription)")
|
print("[LivePhotoValidator] requestLivePhoto error: \(error.localizedDescription)")
|
||||||
|
#endif
|
||||||
hasResumed = true
|
hasResumed = true
|
||||||
continuation.resume(returning: nil)
|
continuation.resume(returning: nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if let cancelled = info[PHLivePhotoInfoCancelledKey] as? Bool, cancelled {
|
if let cancelled = info[PHLivePhotoInfoCancelledKey] as? Bool, cancelled {
|
||||||
|
#if DEBUG
|
||||||
print("[LivePhotoValidator] requestLivePhoto cancelled")
|
print("[LivePhotoValidator] requestLivePhoto cancelled")
|
||||||
|
#endif
|
||||||
hasResumed = true
|
hasResumed = true
|
||||||
continuation.resume(returning: nil)
|
continuation.resume(returning: nil)
|
||||||
return
|
return
|
||||||
@@ -415,7 +419,9 @@ public actor LivePhotoValidator {
|
|||||||
// 添加超时保护,防止无限等待
|
// 添加超时保护,防止无限等待
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
|
||||||
guard !hasResumed else { return }
|
guard !hasResumed else { return }
|
||||||
|
#if DEBUG
|
||||||
print("[LivePhotoValidator] requestLivePhoto timeout, requestID: \(requestID)")
|
print("[LivePhotoValidator] requestLivePhoto timeout, requestID: \(requestID)")
|
||||||
|
#endif
|
||||||
PHLivePhoto.cancelRequest(withRequestID: requestID)
|
PHLivePhoto.cancelRequest(withRequestID: requestID)
|
||||||
hasResumed = true
|
hasResumed = true
|
||||||
continuation.resume(returning: nil)
|
continuation.resume(returning: nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user