move generate addresses action to qml state machine enter state event

This commit is contained in:
Iuri Matias 2020-05-21 12:35:02 -04:00
parent 15b32ddd5a
commit d434af40e1
3 changed files with 4 additions and 3 deletions

View File

@ -76,7 +76,6 @@ proc mainProc() =
var onboarding = onboarding.newController(events) var onboarding = onboarding.newController(events)
onboarding.init() onboarding.init()
engine.setRootContextProperty("onboardingLogic", onboarding.variant)
engine.setRootContextProperty("onboardingModel", onboarding.variant) engine.setRootContextProperty("onboardingModel", onboarding.variant)
var profile = profile.newController() var profile = profile.newController()

View File

@ -77,7 +77,6 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
label: "I'm new, generate me a key" label: "I'm new, generate me a key"
background: Rectangle {color: "transparent"} background: Rectangle {color: "transparent"}
onClicked: onboardingLogic.generateAddresses()
} }
} }

View File

@ -52,7 +52,10 @@ Page {
DSM.State { DSM.State {
id: genKeyState id: genKeyState
onEntered: genKey.visible = true onEntered: {
genKey.visible = true
onboardingModel.generateAddresses()
}
onExited: genKey.visible = false onExited: genKey.visible = false
DSM.SignalTransition { DSM.SignalTransition {