Lock the Link New Device flow to portrait and improve Cancel/Try Again handling. (#5094)

* Lock the LinkNewDeviceScreen to portrait.

* Add cancel buttons to the QR Code errors and handle cancel/startOver correctly.

* Use the shared QRCodeErrorView in the LinkNewDeviceScreen.

* Clarify the different QR Error/ErrorStates a bit more.

* Update snapshots.
This commit is contained in:
Doug
2026-02-12 11:21:24 +00:00
committed by GitHub
parent 6b93bbf558
commit 92a5fb395c
75 changed files with 303 additions and 193 deletions
@@ -16,10 +16,12 @@ enum LinkNewDeviceScreenCoordinatorAction {
struct LinkNewDeviceScreenCoordinatorParameters {
let clientProxy: ClientProxyProtocol
let orientationManager: OrientationManagerProtocol
}
final class LinkNewDeviceScreenCoordinator: CoordinatorProtocol {
private let viewModel: LinkNewDeviceScreenViewModelProtocol
private let orientationManager: OrientationManagerProtocol
private var cancellables = Set<AnyCancellable>()
@@ -30,6 +32,7 @@ final class LinkNewDeviceScreenCoordinator: CoordinatorProtocol {
init(parameters: LinkNewDeviceScreenCoordinatorParameters) {
viewModel = LinkNewDeviceScreenViewModel(clientProxy: parameters.clientProxy)
orientationManager = parameters.orientationManager
}
func start() {
@@ -47,6 +50,13 @@ final class LinkNewDeviceScreenCoordinator: CoordinatorProtocol {
}
}
.store(in: &cancellables)
orientationManager.setOrientation(.portrait)
orientationManager.lockOrientation(.portrait)
}
func stop() {
orientationManager.lockOrientation(.all)
}
func toPresentable() -> AnyView {