From 624ecbaefd6276734734f90cb4014ed17895debd Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 20 Nov 2024 15:19:31 +0800 Subject: [PATCH] Handle NeedToSignTermsOfService account state in file provider components Signed-off-by: Claudio Cambra --- src/gui/macOS/fileproviderdomainmanager_mac.mm | 1 + src/gui/macOS/fileprovidersocketcontroller.cpp | 1 + src/gui/macOS/fileproviderxpc_mac.mm | 1 + 3 files changed, 3 insertions(+) diff --git a/src/gui/macOS/fileproviderdomainmanager_mac.mm b/src/gui/macOS/fileproviderdomainmanager_mac.mm index e43371704..38a51c959 100644 --- a/src/gui/macOS/fileproviderdomainmanager_mac.mm +++ b/src/gui/macOS/fileproviderdomainmanager_mac.mm @@ -581,6 +581,7 @@ void FileProviderDomainManager::slotAccountStateChanged(const AccountState * con break; case AccountState::SignedOut: case AccountState::AskingCredentials: + case AccountState::NeedToSignTermsOfService: { // Disconnect File Provider domain while unauthenticated const auto trReason = tr("This account is not authenticated. Please check your account state in the %1 application.").arg(APPLICATION_NAME); diff --git a/src/gui/macOS/fileprovidersocketcontroller.cpp b/src/gui/macOS/fileprovidersocketcontroller.cpp index 44fca50f2..b8d09abf8 100644 --- a/src/gui/macOS/fileprovidersocketcontroller.cpp +++ b/src/gui/macOS/fileprovidersocketcontroller.cpp @@ -174,6 +174,7 @@ void FileProviderSocketController::slotAccountStateChanged(const AccountState::S case AccountState::SignedOut: case AccountState::AskingCredentials: case AccountState::RedirectDetected: + case AccountState::NeedToSignTermsOfService: // Notify File Provider that it should show the not authenticated message sendNotAuthenticated(); break; diff --git a/src/gui/macOS/fileproviderxpc_mac.mm b/src/gui/macOS/fileproviderxpc_mac.mm index 965f826c5..cc4b14a2a 100644 --- a/src/gui/macOS/fileproviderxpc_mac.mm +++ b/src/gui/macOS/fileproviderxpc_mac.mm @@ -101,6 +101,7 @@ void FileProviderXPC::slotAccountStateChanged(const AccountState::State state) c case AccountState::SignedOut: case AccountState::AskingCredentials: case AccountState::RedirectDetected: + case AccountState::NeedToSignTermsOfService: // Notify File Provider that it should show the not authenticated message unauthenticateExtension(extensionAccountId); break;