summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-03 19:37:17 -0500
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-04 14:18:22 -0700
commit4af9ee5deaa087bdbbb3ca9a79ff199cc6b89529 (patch)
treeb96ad90772ee4d5dedf7b5197a0c13abec665440 /qt-mobile/qml
parent5821c56da24d0aa02e5bb6d54f14e7651d23269b (diff)
downloadsubsurface-4af9ee5deaa087bdbbb3ca9a79ff199cc6b89529.tar.gz
QML UI: don't immediately save data after we make changes
Much as this felt like the prudent thing to do, it makes the UI painful to use. In bad network conditions, with a large dive log, on a phone, the save operation can take more than a minute - which is just completely ludicrous. So instead we mark the dive list changed when we make changes and wait for the app to not be in the foreground. Once the OS tells us that we are hidden (on the desktop that generally means we don't have focus, on a mobile device it usually does mean that the app is not on the screen), we check if there are data to be saved and do so. There is of course a major problem with this logic. If the user switches away from Subsurface-mobile but comes back fairly quickly (just reacting to a notification or briefly checking something, changing a song, something... then the app may still be non-responsive for quite a while. So we need to do something about the time it takes us to save the git tree locally, and then figure out if we can move at least some of the network traffic to another thread. And we need to make sure the user immediately notices that the app is not crashed but is actually saving their data. But that's for another commit. tl;dr: CAREFUL, don't kill Subsurface-mobile before it had time to save your data or your changes may be gone. In typical use that shouldn't be an issue, but it is something that we need to tell the user about. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qml')
0 files changed, 0 insertions, 0 deletions