summaryrefslogtreecommitdiffstats
path: root/qt-mobile
AgeCommit message (Collapse)Author
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Don't write back dive data that hasn't changed in gitGravatar Linus Torvalds
This caches the git ID for the dive on load, and avoids building the dive directory and hashing it on save as long as nothing has invalidated the git ID cache. That should make it much faster to write back data to the git repository, since the dive tree structure and the divecomputer blobs in particular are the bulk of it (due to all the sample data). It's not actually the git operations that are all that expensive, it's literally generating the big blob with all the snprintf() calls for the data. The git save used to be a fairly expensive with large data sets, especially noticeable on mobile with much weaker CPU's. This should speed things up by at least a factor of two. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: include the new back button for iOSGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Revert "QML UI: make sure the correct data is in the bread crumbs"Gravatar Dirk Hohndel
This reverts commit 410fd222d15dca8673606133499cefde780f163b. The change this relied on was rejected by upstream Kirigami Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: animate showing the dive edit sheetGravatar Dirk Hohndel
This now uses the correct property to open the OverlaySheet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Revert "QML UI: animate showing the dive edit sheet"Gravatar Dirk Hohndel
This reverts commit faa22d5343f39f335bc281e139bc347241295ebf. Upstream Kirigami already had a property to do this. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: rate limit git progress outputGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Use the same format for output to stderr and AppLogGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: keep cloud sync enabled state in settingsGravatar Dirk Hohndel
So if the app gets closed and restarted, it will continue to not sync (or sync) over the network. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: allow user to disable automatic cloud syncGravatar Dirk Hohndel
This is useful if you are in an area with slow or spotty network and if you are fine with just saving to the phone. In order to sync to the cloud you either have to manually sync via the menu or turn this back on and hide the application. The commit also removes the old refresh from the Manage dives menu as the semantic of that was possibly destructive now that we no longer immediately save changes to git - those could be thrown away by selecting refresh before the app had a chance to save them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: be more careful when to show us accessing the cloudGravatar Dirk Hohndel
There may be other paths where we potentially show the wrong status to the user... but at least with this it times out eventually; there shouldn't be any single operation that isn't broken down with progress markers that takes more than 10 seconds, so keeping the notification around for 30 seconds seems very conservative. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04QML UI: don't immediately save data after we make changesGravatar Dirk Hohndel
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>
2016-04-04Instrument the git storage codeGravatar Dirk Hohndel
This allows fairly fine grained analysis on what part of loading from and saving to git we are spending our time. Compute performance and network speed play a significant role in how all this plays out. The routine to check if we can reach the cloud server is modified to send updates every second so we don't hang without any feedback for five seconds when there is network but we can't reach the cloud server (not an unlikely scenario in many dive locations with poor network quality) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Make accessingCloud an integer so it can convey more informationGravatar Dirk Hohndel
This will be used to simulate a progress bar eventually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Change the git progress update callback signatureGravatar Dirk Hohndel
This way we can include additional text. This will be used in later patches. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: make sure the correct data is in the bread crumbsGravatar Dirk Hohndel
Once again this requires changes that aren't upstream in Kirigami. But with this the bread crumbs update when the user swipes from dive to dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: remove obsolete codeGravatar Dirk Hohndel
This simply causes an error Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: tap on the very top / title bar of dive list goes to topGravatar Dirk Hohndel
This requires changes to Kirigami that aren't upstream, yet. So there's a chance that this commit will have to be changed or reverted / redone. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: work around problem starting some actions while on the App logGravatar Dirk Hohndel
If you show the App log and then start "Add dive manually" or "Show GPS fixes" you get this odd behavior that the page stack returns to the App log for some reason. A simple workaround is of course to return to the dive list, first. Not ideal (because there shouldn't be a reason not to have the All log in the stack as well, but not really a big problem, either, since the App log is mainly intended for developers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: redo application log pageGravatar Dirk Hohndel
This makes things wrap and scroll correctly again for me Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02whitespace cleanup for previous commitGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: press and hold for delete dive on dive listGravatar Dirk Hohndel
This looks a little rough, but I think it works well. I'm sure it could be prettier, though. The next patch will just do the white space cleanup for the additional indentation level. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: don't go through manager object to show mapGravatar Dirk Hohndel
We can open URLs in the browser directly from QML. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02QML UI: don't go through manager object to open user manualGravatar Dirk Hohndel
We can open URLs in the browser directly from QML. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: when on the dive list, action button now offers add diveGravatar Dirk Hohndel
This seems like a useful default action when people are looking at the dive list (and it's a request from a user to have this as a button instead of just via the menu). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: add an "add" iconGravatar Dirk Hohndel
Again, proudly borrowing from the breeze icon set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: put add dive action in a functionGravatar Dirk Hohndel
This way we can call this from a button as well as the menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01qml white space fixesGravatar Dirk Hohndel
Left over from the merge of the Kirigami 1.0 port Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: add space at the top of dive details viewGravatar Dirk Hohndel
With the switch to Kirigami 1.0 it seems that the top bar now overlaps the page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: animate showing the dive edit sheetGravatar Dirk Hohndel
This requires a change to Kirigami so that a property change (instead of calling the open() function) can trigger the animation. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: end editing mode when edit overlay is flicked offscreenGravatar Dirk Hohndel
Just changing the state isn't quite enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: fix small bug in main menuGravatar Dirk Hohndel
One Action hadn't been converted to a Kirigami.Action. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: avoid having the virtual keyboard show briefly at startupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: better visual arrangement of the dive listGravatar Dirk Hohndel
Make the lines that together form one dive move closer together so the dives visually stand out more. (this also includes small white space change, oops) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: make the dive list font even darkerGravatar Dirk Hohndel
Still not black, though - there's an opacity setting somewhere that I must be missing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-01QML UI: use the new Kirigami option to control the title bar sizesGravatar Dirk Hohndel
I liked the default and the fact that it disappeared completely, but the big size was a bit too much... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-31Merge branch 'kirigamiPort' of https://github.com/sebasje/subsurface into ↵Gravatar Dirk Hohndel
mergeKirigamiPort This merge was a bit more challenging given how far things had diverged, but I hope I got it mostly right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30QML UI: simplify the code to cancel edit / addGravatar Dirk Hohndel
This way we have one function that correctly ends both modes. As a positive side effect this fixes a bug where one could exit the add mode by tapping Dive list in the main menu which would not delete the partially created dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30QML UI: scroll to top of dive list when tapping title barGravatar Dirk Hohndel
This helps you get to the latest dive when you are stuck at the bottom of a dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30QML UI: add property to reflect when dive list is shownGravatar Dirk Hohndel
This makes it easier to have actions that are only valid in this case. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30Revert "QML UI: make dive list fold dive trips"Gravatar Dirk Hohndel
This reverts commit 83c72e7a79458826b677e82f108f3e92022c58b6. The folding as implemented is too painfully slow and buggy on devices. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-30Revert "QML UI: make dives outside of dive trips always visible"Gravatar Dirk Hohndel
This reverts commit a065b974723896df91a8da93803fbb47571201bf. The folding as implemented is too painfully slow and buggy on devices. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-29QML UI: remove a few obsolete properties and referencesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-29QML UI: add SAC rate to dive detail viewGravatar Dirk Hohndel
Not sure why this wasn't there before, it's certainly one of the more interesting values for me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-29QML UI: make dives outside of dive trips always visibleGravatar Dirk Hohndel
Create small visible separation from the dive trip before. And make the dive trip header a slightly different color so they stand out between dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-29QML UI: make dive list fold dive tripsGravatar Dirk Hohndel
This makes it MUCH easier to deal with a lot of dives. Instead of needing a more complicated model we simply use the meta data that allows us to create the dive trip sections to hide (make invisible + height 0) all dives that aren't in the selected trip. I'll admit that this was much easier than I expected it to be. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-28QML UI: take device pixel ratio into account when scaling pixmaps on iOSGravatar Dirk Hohndel
This way warning icons and tank change icons and other event markers are no longer ridiculously tiny on retina screens. Oddly this doesn't appear to be needed on Android, only on iOS. Fixes #1033 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-27QML UI: tighten credential input screenGravatar Dirk Hohndel
This way even on smaller screens both email and password should fit above the keyboard which makes data entry so much easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-26QML UI: add some diagnostics to App logGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-26QML UI: allow writing to App log from QMLGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>