mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Simplify LinkNewDeviceScreen preview test setup and fix preview and accessibility test reliability.
This commit is contained in:
committed by
Stefan Ceriu
parent
11f9162e0a
commit
69e3f8bc9b
@@ -19,9 +19,14 @@ class LinkNewDeviceScreenViewModel: LinkNewDeviceScreenViewModelType, LinkNewDev
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(clientProxy: ClientProxyProtocol) {
|
||||
init(clientProxy: ClientProxyProtocol, initialState: LinkNewDeviceScreenViewState? = nil) {
|
||||
self.clientProxy = clientProxy
|
||||
|
||||
if let initialState {
|
||||
super.init(initialViewState: initialState)
|
||||
return
|
||||
}
|
||||
|
||||
let isQRCodeScanningSupported = !ProcessInfo.processInfo.isiOSAppOnMac
|
||||
|
||||
super.init(initialViewState: LinkNewDeviceScreenViewState(showLinkDesktopComputerButton: isQRCodeScanningSupported))
|
||||
|
||||
Reference in New Issue
Block a user