Improve detection of link device completion when linking a new device via QR (#5323)

* Improve detection of link device completion

* Fix tests to match
This commit is contained in:
Hugh Nimmo-Smith
2026-04-08 09:48:00 +01:00
committed by GitHub
parent 70fdfed634
commit ac14265869
3 changed files with 12 additions and 11 deletions
@@ -224,12 +224,10 @@ class QRCodeLoginScreenViewModel: QRCodeLoginScreenViewModelType, QRCodeLoginScr
case .waitingForAuthorisation(let url):
requestOIDCAuthorization(url: url)
case .syncingSecrets:
// break // Nothing to do.
// .done is rarely received at the moment, so lets consider linking to be done here.
break // Nothing to do.
case .done:
MXLog.info("Link with QR code completed.")
actionsSubject.send(.linkedDevice)
case .done:
break // Not necessary right now with the workaround above in place.
}
}
}