From c995795d8070b35438112e892ca04d8a76144169 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 25 May 2023 15:39:20 +0200 Subject: [PATCH] Copilot: Fix spinner if Copilot not configure Previously the progress indicator would be visible if node.js or the lsp path was not configured. Change-Id: Ief235253c6cfcb8f8fb533fe746edc7d0cc5867c Reviewed-by: David Schulz Reviewed-by: --- src/plugins/copilot/authwidget.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/copilot/authwidget.cpp b/src/plugins/copilot/authwidget.cpp index ed2870e85e1..31b4660b680 100644 --- a/src/plugins/copilot/authwidget.cpp +++ b/src/plugins/copilot/authwidget.cpp @@ -91,9 +91,13 @@ void AuthWidget::updateClient(const Utils::FilePath &nodeJs, const Utils::FilePa { LanguageClientManager::shutdownClient(m_client); m_client = nullptr; - setState(Tr::tr("Sign in"), true); - if (!nodeJs.exists() || !agent.exists()) + setState(Tr::tr("Sign in"), false); + m_button->setEnabled(false); + if (!nodeJs.exists() || !agent.exists()) { return; + } + + setState(Tr::tr("Sign in"), true); m_client = new CopilotClient(nodeJs, agent); connect(m_client, &Client::initialized, this, &AuthWidget::checkStatus);