diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-04-22 07:10:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-04-27 15:05:37 -0700 |
commit | 4b1edceca0342a403ee549987e156b03ce8767e0 (patch) | |
tree | ed487abb6de0ebfbd63b5137e4c11c4b10f9cd43 /mobile-widgets/qmlmanager.cpp | |
parent | 7c156f3ba1c1b2129453836f9c99de97621acb2b (diff) | |
download | subsurface-4b1edceca0342a403ee549987e156b03ce8767e0.tar.gz |
Add helper function for the consumption of loaded dive data
This allows us to call that part of the process from multiple places
in the future.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9aae67f33..7780a3ff6 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -412,6 +412,12 @@ void QMLManager::loadDivesWithValidCredentials() alreadySaving = false; return; } + consumeFinishedLoad(currentDiveTimestamp); + setLoadFromCloud(true); +} + +void QMLManager::consumeFinishedLoad(timestamp_t currentDiveTimestamp) +{ prefs.unit_system = informational_prefs.unit_system; if (informational_prefs.unit_system == IMPERIAL) informational_prefs.units = IMPERIAL_units; @@ -426,7 +432,6 @@ void QMLManager::loadDivesWithValidCredentials() appendTextToLog(QStringLiteral("%1 dives loaded").arg(dive_table.nr)); if (dive_table.nr == 0) setStartPageText(tr("Cloud storage open successfully. No dives in dive list.")); - setLoadFromCloud(true); alreadySaving = false; } |