@@ -420,13 +420,15 @@ class AppCoordinator: NSObject {
420420 let alert = UIAlertController ( title: String . localized ( " confirm_add_transport " ) , message: qrParsed. text1, preferredStyle: . alert)
421421 alert. addAction ( UIAlertAction ( title: String . localized ( " cancel " ) , style: . cancel, handler: nil ) )
422422 alert. addAction ( UIAlertAction ( title: String . localized ( " ok " ) , style: . default, handler: { [ weak self] _ in
423- guard let self = self else { return }
424- popTabsToRootViewControllers ( )
425- showTab ( index: settingsTab)
426- guard let root = tabBarController. selectedViewController as? UINavigationController else { return }
427- let advancedViewController = AdvancedViewController ( dcAccounts: dcAccounts)
428- let transportViewController = TransportListViewController ( dcContext: dcContext, dcAccounts: dcAccounts, continueQrScan: code)
429- root. setViewControllers ( [ root. viewControllers [ 0 ] , advancedViewController, transportViewController] , animated: true )
423+ Utils . authenticateDeviceOwner ( reason: String . localized ( " edit_transport " ) ) { [ weak self] in
424+ guard let self = self else { return }
425+ popTabsToRootViewControllers ( )
426+ showTab ( index: settingsTab)
427+ guard let root = tabBarController. selectedViewController as? UINavigationController else { return }
428+ let advancedViewController = AdvancedViewController ( dcAccounts: dcAccounts)
429+ let transportViewController = TransportListViewController ( dcContext: dcContext, dcAccounts: dcAccounts, continueQrScan: code)
430+ root. setViewControllers ( [ root. viewControllers [ 0 ] , advancedViewController, transportViewController] , animated: true )
431+ }
430432 } ) )
431433 viewController. present ( alert, animated: true , completion: nil )
432434
0 commit comments