Fix notification issue.

This commit is contained in:
Black Hat
2018-09-10 08:06:32 +08:00
parent f5b24f32b8
commit 13a8d6b889
10 changed files with 47 additions and 83 deletions

View File

@@ -3,6 +3,8 @@ import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import QtQuick.Controls.Material 2.2
import "qrc:/js/util.js" as Util
ItemDelegate {
property var page
readonly property bool selected: stackView.currentItem === page
@@ -18,14 +20,5 @@ ItemDelegate {
}
}
onClicked: {
if(page && stackView.currentItem !== page) {
if(stackView.depth === 1) {
stackView.replace(page)
} else {
stackView.clear()
stackView.push(page)
}
}
}
onClicked: Util.pushToStack(stackView, page)
}