mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <dirk@hohndel.org>
This commit is contained in:
parent
0673e53a68
commit
001fb7f4fa
2 changed files with 7 additions and 11 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue