to call _handleDisconnection when it fails update. Updated ScannerScreen to manage navigation state logic on connection.