Don't do the slow motion scrolling through the list if we previously
showed a different dive in the list.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This code is very similar to the undo code in the desktop UI, but
untangling that from the desktop seemed massive overkill; we don't have
lists of dives to delete and undelete here - so this is actually much
simpler and easier to maintain (I hope).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The dialog gives the user 3 seconds to undo the delete and then disappears
without any user interaction.
This isn't hooked up, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reduces the margin to use more of the available space and also makes
the first column slightly wider so the word "Cylinder" isn't broken on a
Nexus 6p.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Normally this is triggered when the DiveDetailsView component is
completed, but since QML isn't recreating this component unless we switch
to a dive a couple of spots in the dive list away from this one, we
wouldn't get any changes in the data reflected in the profile.
But since this now redraws the same dive that potentially was drawn last,
we need to make sure we call plotDive() with force=true.
I also suspect that this could help with the strange bug that sometimes we
show a blank profile after certain edits.
See #1013
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows the user to delete the currently shown dive. This action takes
effect right away, no confirmation, it gets right away written to the
local git cache.
One idea for an undo operation here could be to simply reset the git tree
to HEAD^ and reload. Not elegant, but would work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The input is restricted to
EAN100
EANxx (with 'x' one of 0..9)
AIR
xx/xx (with 'x' one of 0..9)
xxx (with 'x' one of 0..9 and the number <= 100)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A dive with zero duration creates an odd profile that is 2min 30seconds
long and looks just weird. Instead, simply show a text that there is on
profile shown for such a dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is more consistent with the rest of our UI
To make this work you once again need changes to the mobile components
that aren't upstream, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First cylinder only, show warning if there are more than one cylinder defined.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Android users are well used to using the back key for this. I kept the
code in place as things may end up completely different on IOS or other
mobile platforms.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows us to shrink the top bar quite a bit and have a little more
screen real estate. In order to maintain functionality we need to reenable
the context menu on some screens.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This doesn't quite work yet as the start page appears to miscalculate its
height (the cloud credentials page appears to be missing).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make things centered, lay them out correctly, make sure the image fits.
This includes the re-indentation of the previous commit - but the changes
are so massive that it seemed pointless to do this as its own commit.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With the integration of the credentials into the start page the logic for
this has changed.
Since the code for start page and dive list is actually on the same page,
using opacity to switch between the two sub pages (depending on whether we
have valid credentials and dives to show), the old way of changing
credentials no longer worked.
With theis patch the user once again can change their credentials (and
change their mind and go back to the dive list).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For the ThemeTest we could simply drop the item, for the GPS preferences
and the DowbloadFromDiveComputer page everything got indented by one
level.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reported by a beta tester for the GPS preferences, but affects a couple
more. We need to make sure that any page on the page stack is actually a
MobileComponents.Page, other wise the Android back key doesn't close the
page.
This commit changes GPS preferences, the theme test, and the currently
disabled download from divecomputer. it contains only the actual change
(wrap the current content in a page). The reindentation is a separate
commit for readability.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It now explains the relationship between Subsurface-mobile and the desktop
application and allows the user to enter the cloud credentials right
there.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of using this on its own page, it makes more sense to use it as
part of the start page directly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't pretty, but having the version string available on a place
that people are likely to find does make sense when going public with
the Subsurface-mobile. Especially when we do a public release, I assume
the developer menu with App log might not be readily available for
people to identify their installed version.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A dive would linger in edit mode when following these steps:
start mobile. show theme info. click on dive in dive list.
click edit. click back in topbar, again click back in the topbar.
click on dive in dive list, still in edit mode.
Not anymore. Also enable back button when viewing a dive.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I don't know how this got here. Probably having fun
with copy and paste.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The app log and theme info had context menus
with a single close item. No need for that.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
First cylinder only, show warning if there are more than one cylinder defined.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Even setting things up in the first row isn't enough. Every field in the
grid needs an explicit width. How dumb is that.
To make this more manageable calculate the correct widths at the beginning
and then just reference those properties.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>