summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-03 05:05:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-08 20:50:05 +0100
commit08e2013d1e10845ed15ed62709580128ff65e1eb (patch)
tree690507acf2fa672b3d9584827893b59280117f6e
parent4111de70e84121b7f6163373fc4c66fb57a85b8c (diff)
downloadsubsurface-08e2013d1e10845ed15ed62709580128ff65e1eb.tar.gz
Mobile: remove useless attempt to prevent access to the cloud
This code really made no sense, adding a comment to try to explain that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--mobile-widgets/qmlmanager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 81b105d19..1aadc6b50 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -280,10 +280,10 @@ void QMLManager::openLocalThenRemote(QString url)
DiveListModel::instance()->clear();
setNotificationText(tr("Open local dive data file"));
QByteArray fileNamePrt = QFile::encodeName(url);
- bool glo = git_local_only;
- git_local_only = true;
+ /* if this is a cloud storage repo and we have no local cache (i.e., it's the first time
+ * we try to open this), parse_file will ALWAYS connect to the remote and populate the cache.
+ * Otherwise parse_file will respect the git_local_only flag and only update if that isn't set */
int error = parse_file(fileNamePrt.data(), &dive_table, &trip_table, &dive_site_table);
- git_local_only = glo;
if (error) {
appendTextToLog(QStringLiteral("loading dives from cache failed %1").arg(error));
setNotificationText(tr("Opening local data file failed"));