mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 21:04:32 +00:00
MiddlePanel: add an optional onPageClosed callback
to match onPageCompleted
This commit is contained in:
parent
26abdee5c4
commit
af4e49cd0f
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue