diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-03-11 08:05:29 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-03-11 10:10:13 -0800 |
commit | 5a83226aa8d7211e88097265af1cba29113d6cc1 (patch) | |
tree | e5dc66baa175498382b5da26bbad599e12c75cec | |
parent | c4fb42f8ad5827619c72e7c7d8f75d247c08ae68 (diff) | |
download | subsurface-5a83226aa8d7211e88097265af1cba29113d6cc1.tar.gz |
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>
-rw-r--r-- | qt-mobile/qml/DiveDetails.qml | 10 | ||||
-rw-r--r-- | qt-mobile/qml/main.qml | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/qt-mobile/qml/DiveDetails.qml b/qt-mobile/qml/DiveDetails.qml index 19a3466db..d7db35227 100644 --- a/qt-mobile/qml/DiveDetails.qml +++ b/qt-mobile/qml/DiveDetails.qml @@ -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) + }); } } ] diff --git a/qt-mobile/qml/main.qml b/qt-mobile/qml/main.qml index 3569535e0..4e2c42f7b 100644 --- a/qt-mobile/qml/main.qml +++ b/qt-mobile/qml/main.qml @@ -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(); } |