summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-28 17:39:01 +0100
committerGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-31 14:48:14 +0100
commite4c8d6968f7b0410c600b821df372c123539c71a (patch)
tree082ec4b0cf4202f6af37160005ce0e8b0c778a4b /mobile-widgets/qmlmanager.cpp
parent494ad2654082d85846cb902556921ab62a6dbb14 (diff)
downloadsubsurface-e4c8d6968f7b0410c600b821df372c123539c71a.tar.gz
mobile: introduce simple private helper updateAllGlobalLists()
As we need to update our new stringlist models on multiple locations, just refactor them into a new function. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index d28fa11ae..08882c324 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -273,6 +273,11 @@ void QMLManager::openLocalThenRemote(QString url)
appendTextToLog(QStringLiteral("have cloud credentials, trying to connect"));
tryRetrieveDataFromBackend();
}
+ updateAllGlobalLists();
+}
+
+void QMLManager::updateAllGlobalLists()
+{
buddyModel.updateModel(); emit buddyListChanged();
suitModel.updateModel(); emit suitListChanged();
divemasterModel.updateModel(); emit divemasterListChanged();
@@ -1101,6 +1106,7 @@ void QMLManager::changesNeedSaving()
#elif !defined(Q_OS_IOS)
saveChangesCloud(false);
#endif
+ updateAllGlobalLists();
}
void QMLManager::openNoCloudRepo()