mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
QML UI: try to clean up UI before showing notification
This way we shouldn't have a drawer or other changes to the UI prevent the user from seeing / interacting with the notification. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c4fb42f8ad
commit
5a83226aa8
2 changed files with 7 additions and 5 deletions
|
@ -62,14 +62,14 @@ MobileComponents.Page {
|
|||
text: "Delete dive"
|
||||
iconName: "trash-empty"
|
||||
onTriggered: {
|
||||
contextDrawer.close()
|
||||
var deletedId = diveDetailsListView.currentItem.modelData.dive.id
|
||||
manager.deleteDive(deletedId)
|
||||
showPassiveNotification("Dive deleted", 3000, "Undo",
|
||||
function() {
|
||||
manager.undoDelete(deletedId)
|
||||
});
|
||||
contextDrawer.close()
|
||||
stackView.pop()
|
||||
showPassiveNotification("Dive deleted", 3000, "Undo",
|
||||
function() {
|
||||
manager.undoDelete(deletedId)
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -103,6 +103,7 @@ MobileComponents.ApplicationWindow {
|
|||
Action {
|
||||
text: "Refresh"
|
||||
onTriggered: {
|
||||
globalDrawer.close()
|
||||
detailsWindow.endEditMode()
|
||||
manager.loadDives();
|
||||
}
|
||||
|
@ -110,6 +111,7 @@ MobileComponents.ApplicationWindow {
|
|||
Action {
|
||||
text: "Upload to cloud"
|
||||
onTriggered: {
|
||||
globalDrawer.close()
|
||||
detailsWindow.endEditMode()
|
||||
manager.saveChanges();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue