mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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"
|
text: "Delete dive"
|
||||||
iconName: "trash-empty"
|
iconName: "trash-empty"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
contextDrawer.close()
|
||||||
var deletedId = diveDetailsListView.currentItem.modelData.dive.id
|
var deletedId = diveDetailsListView.currentItem.modelData.dive.id
|
||||||
manager.deleteDive(deletedId)
|
manager.deleteDive(deletedId)
|
||||||
showPassiveNotification("Dive deleted", 3000, "Undo",
|
|
||||||
function() {
|
|
||||||
manager.undoDelete(deletedId)
|
|
||||||
});
|
|
||||||
contextDrawer.close()
|
|
||||||
stackView.pop()
|
stackView.pop()
|
||||||
|
showPassiveNotification("Dive deleted", 3000, "Undo",
|
||||||
|
function() {
|
||||||
|
manager.undoDelete(deletedId)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -103,6 +103,7 @@ MobileComponents.ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Refresh"
|
text: "Refresh"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
globalDrawer.close()
|
||||||
detailsWindow.endEditMode()
|
detailsWindow.endEditMode()
|
||||||
manager.loadDives();
|
manager.loadDives();
|
||||||
}
|
}
|
||||||
|
@ -110,6 +111,7 @@ MobileComponents.ApplicationWindow {
|
||||||
Action {
|
Action {
|
||||||
text: "Upload to cloud"
|
text: "Upload to cloud"
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
globalDrawer.close()
|
||||||
detailsWindow.endEditMode()
|
detailsWindow.endEditMode()
|
||||||
manager.saveChanges();
|
manager.saveChanges();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue