diff options
Diffstat (limited to 'mobile-widgets/qml/DiveDetails.qml')
-rw-r--r-- | mobile-widgets/qml/DiveDetails.qml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mobile-widgets/qml/DiveDetails.qml b/mobile-widgets/qml/DiveDetails.qml index 3d146ce46..d562e0a98 100644 --- a/mobile-widgets/qml/DiveDetails.qml +++ b/mobile-widgets/qml/DiveDetails.qml @@ -54,11 +54,12 @@ Kirigami.Page { onTriggered: { contextDrawer.close() var deletedId = diveDetailsListView.currentItem.modelData.dive.id + var deletedIndex = diveDetailsListView.currentIndex manager.deleteDive(deletedId) stackView.pop() showPassiveNotification("Dive deleted", 3000, "Undo", function() { - manager.undoDelete(deletedId) + diveDetailsListView.currentIndex = manager.undoDelete(deletedId) ? deletedIndex : diveDetailsListView.currentIndex }); } } |