From 001fb7f4faca9b5e10b7c3e4d9f28f9ba39f5af1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 2 Apr 2020 15:28:03 -0700 Subject: mobile UI: delay reading the dive list until app is active This way the launch screen is shown significantly shorter on a device, and instead the user sees our progress notifications. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mobile-widgets/qmlmanager.cpp') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 9727f1deb..847f1dd71 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -313,6 +313,11 @@ void QMLManager::applicationStateChanged(Qt::ApplicationState state) stateText.append((unsaved_changes() ? QLatin1String("") : QLatin1String("no ")) + QLatin1String("unsaved changes")); appendTextToLog(stateText); + if (state == Qt::ApplicationActive && !m_initialized) { + // once the app UI is displayed, finish our setup and mark the app as initialized + finishSetup(); + appInitialized(); + } if (state == Qt::ApplicationInactive && unsaved_changes()) { // saveChangesCloud ensures that we don't have two conflicting saves going on appendTextToLog("trying to save data as user switched away from app"); -- cgit v1.2.3-70-g09d2