summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2017-09-27 18:27:12 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-09-29 08:13:25 -0700
commit85dfdaa3e50398d090b3ae5f3cc3159f7fb82887 (patch)
treecac167de6e7033a17040676f6bb008d910ab70dc /mobile-widgets
parent6ea3fd3d92fdfeeaed64315ed31bb8e97c107f6b (diff)
downloadsubsurface-85dfdaa3e50398d090b3ae5f3cc3159f7fb82887.tar.gz
mobile: only deal with localrepo in NOCLOUD mode
This is a very subtile bug. Testing/developing on the desktop for mobile, with a normal logbook in a git repo, resulted in a surprising effect. When swichting from a cloud account to a NOCLOUD situation, the no cloud repo was (not always) reset to the NOCLOUD_LOCALSTORAGE, but to the normal logbook. Resuling in commits in the wrong repo. This can easily be solved by setting the filename to NOCLOUD_LOCALSTORAGE, when switching to NOCLOUD mode. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 6292f95fe..e30d7ca9a 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1413,8 +1413,10 @@ QMLManager::cloud_status_qml QMLManager::credentialStatus() const
void QMLManager::setCredentialStatus(const cloud_status_qml value)
{
if (m_credentialStatus != value) {
- if (value == CS_NOCLOUD)
+ if (value == CS_NOCLOUD) {
appendTextToLog("Switching to no cloud mode");
+ set_filename(NOCLOUD_LOCALSTORAGE, true);
+ }
m_credentialStatus = value;
emit credentialStatusChanged();
}