Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex-z <blackslayer4@gmail.com>2021-12-16 19:23:03 +0300
committeralex-z <blackslayer4@gmail.com>2022-01-05 11:01:13 +0300
commit62b0a9b9f17d6d531f9bd005de6a87c92f7ff8e1 (patch)
tree217c4c9d2606e647ce556c290e9044fa29b4cb14 /src/gui/accountstate.cpp
parentd790bafcadb458360552366e952be99472877cef (diff)
Try to sign-in after being signed-out due to SslHandshakeFailedError
Signed-off-by: alex-z <blackslayer4@gmail.com>
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r--src/gui/accountstate.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp
index 7521dac79..6100f70fc 100644
--- a/src/gui/accountstate.cpp
+++ b/src/gui/accountstate.cpp
@@ -221,6 +221,19 @@ void AccountState::setDesktopNotificationsAllowed(bool isAllowed)
emit desktopNotificationsAllowedChanged();
}
+AccountState::ConnectionStatus AccountState::lastConnectionStatus() const
+{
+ return _lastConnectionValidatorStatus;
+}
+
+void AccountState::trySignIn()
+{
+ if (isSignedOut() && account()) {
+ account()->resetRejectedCertificates();
+ signIn();
+ }
+}
+
void AccountState::checkConnectivity()
{
if (isSignedOut() || _waitingForNewCredentials) {
@@ -285,6 +298,8 @@ void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status sta
return;
}
+ _lastConnectionValidatorStatus = status;
+
// Come online gradually from 503 or maintenance mode
if (status == ConnectionValidator::Connected
&& (_connectionStatus == ConnectionValidator::ServiceUnavailable