summaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/qml/main.qml4
-rw-r--r--qt-mobile/qmlmanager.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml
index 3ed5aeac9..6b6116611 100644
--- a/qt-mobile/qml/main.qml
+++ b/qt-mobile/qml/main.qml
@@ -22,7 +22,9 @@ Kirigami.ApplicationWindow {
property bool showingDiveList: false
onAccessingCloudChanged: {
if (accessingCloud >= 0) {
- showPassiveNotification("Accessing Subsurface Cloud Storage " + accessingCloud +"%", 500000);
+ // we now keep updating this to show progress, so timing out after 30 seconds is more useful
+ // but should still be very conservative
+ showPassiveNotification("Accessing Subsurface Cloud Storage " + accessingCloud +"%", 30000);
} else {
hidePassiveNotification();
}
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 3f4e4c2ec..b8683de43 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -122,6 +122,7 @@ void QMLManager::openLocalThenRemote(QString url)
QByteArray fileNamePrt = QFile::encodeName(url);
prefs.git_local_only = true;
int error = parse_file(fileNamePrt.data());
+ setAccessingCloud(-1);
prefs.git_local_only = false;
if (error) {
appendTextToLog(QStringLiteral("loading dives from cache failed %1").arg(error));
@@ -143,7 +144,6 @@ void QMLManager::openLocalThenRemote(QString url)
appendTextToLog(QStringLiteral("%1 dives loaded from cache").arg(i));
}
appendTextToLog(QStringLiteral("have cloud credentials, trying to connect"));
- setAccessingCloud(0);
tryRetrieveDataFromBackend();
}
@@ -235,6 +235,7 @@ void QMLManager::checkCredentialsAndExecute(execute_function_type execute)
// and (if we haven't done so) load the dive list
if (!same_string(prefs.cloud_storage_email, "") &&
!same_string(prefs.cloud_storage_password, "")) {
+ setAccessingCloud(0);
setStartPageText(tr("Testing cloud credentials"));
appendTextToLog("Have credentials, let's see if they are valid");
connect(manager(), &QNetworkAccessManager::authenticationRequired, this, &QMLManager::provideAuth, Qt::UniqueConnection);