forked from Public/monero-gui
MiddlePanel: add an optional onPageClosed callback
to match onPageCompleted
This commit is contained in:
@@ -39,6 +39,7 @@ Rectangle {
|
||||
id: root
|
||||
|
||||
property Item currentView
|
||||
property Item previousView
|
||||
property bool basicMode : false
|
||||
property string balanceText
|
||||
property string unlockedBalanceText
|
||||
@@ -62,6 +63,12 @@ Rectangle {
|
||||
color: "#F0EEEE"
|
||||
|
||||
onCurrentViewChanged: {
|
||||
if (previousView) {
|
||||
if (typeof previousView.onPageClosed === "function") {
|
||||
previousView.onPageClosed();
|
||||
}
|
||||
}
|
||||
previousView = currentView
|
||||
if (currentView) {
|
||||
stackView.replace(currentView)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user