From 5a83226aa8d7211e88097265af1cba29113d6cc1 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 11 Mar 2016 08:05:29 -0800 Subject: 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 --- qt-mobile/qml/DiveDetails.qml | 10 +++++----- 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(); } -- cgit v1.2.3-70-g09d2