mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
@@ -14,7 +14,12 @@ enum LinkNewDeviceScreenViewModelAction {
|
||||
}
|
||||
|
||||
struct LinkNewDeviceScreenViewState: BindableState {
|
||||
enum Mode: Equatable { case loading, readyToLink(isGeneratingCode: Bool), notSupported }
|
||||
enum Mode: Equatable {
|
||||
case loading
|
||||
case readyToLink(isGeneratingCode: Bool)
|
||||
case error(QRCodeLoginState.ErrorState)
|
||||
}
|
||||
|
||||
var mode: Mode = .loading
|
||||
|
||||
let showLinkDesktopComputerButton: Bool
|
||||
@@ -23,5 +28,6 @@ struct LinkNewDeviceScreenViewState: BindableState {
|
||||
enum LinkNewDeviceScreenViewAction {
|
||||
case linkMobileDevice
|
||||
case linkDesktopComputer
|
||||
case errorAction(QRCodeErrorView.Action)
|
||||
case dismiss
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user