Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
fix: qrcode checking unexpect capture task cancel error
Browse files Browse the repository at this point in the history
  • Loading branch information
CanglongCl committed Sep 17, 2024
1 parent ac559b7 commit ab891c8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ struct GetCookieQRCodeView: View {
guard let ticket = viewModel.qrCodeAndTicket?.ticket else { return }
let task = Task.detached { @MainActor [weak viewModel] in
var counter = 0
loopTask: while case .automatically = viewModel?.scanningConfirmationStatus {
loopTask: while case let .automatically(task) = viewModel?.scanningConfirmationStatus, !task.isCancelled {
guard let viewModel = viewModel else { break loopTask }
do {
let status = try await MiHoYoAPI.queryQRCodeStatus(
Expand Down

0 comments on commit ab891c8

Please sign in to comment.