mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
mobile/dive-list: long press on dive selects and opens context drawer
This way one can execute dive list manipulations without the detour to the dive details screen. For example you can long-press on a dive and then add it to a trip or remove it from a trip. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
289d451294
commit
7fc43c58be
1 changed files with 12 additions and 0 deletions
|
@ -74,6 +74,18 @@ Kirigami.ScrollablePage {
|
|||
}
|
||||
}
|
||||
}
|
||||
// use this to select a dive without switching to dive details; instead open context drawer
|
||||
onPressAndHold: {
|
||||
view.currentIndex = index
|
||||
if (isTrip) {
|
||||
manager.appendTextToLog("press and hold on trip is same as click")
|
||||
manager.toggle(model.row)
|
||||
} else {
|
||||
manager.appendTextToLog("press and hold on dive; open context drawer")
|
||||
manager.selectRow(model.row)
|
||||
contextDrawer.open()
|
||||
}
|
||||
}
|
||||
|
||||
// first we look at the trip
|
||||
Item {
|
||||
|
|
Loading…
Reference in a new issue