I was having some issues with some androids of how to present some pages, for some reason the ‘<b>popAllExceptFirstAndPush‘ pop to the the first page but never pushed to the given page, so I tryed with ‘clearAndPush’ method, and apparantly that solved the problem but now I have this issue: </b>
On the start of the app I do this steps:
- OnPos coordinate: Get user zone , to check if we have service on that area,
- on valid zone : check stored session id is still valid
- if valid go to main page if not go to login page
All of this functions where locked with the ‘isCurrentStackPage’ but now even when I cleared,and Im on the main page or login page, the pos is triggering the getzone function ignoring the flag, I don’t know why the property is true if is not the current stack page, the page was already cleared, I need to destroy it or something? or I understand something wrong of how the Navigation works?
Connections {
target: posSrc
onHasError: {
if (!isCurrentStackPage) {
return
}
grantLocationPopUp.open()
resetButton()
}
onCoordFetched: {
// this is being ignored and is repeated every time the
// pos is refreshed even when I have already left the page
if (!isCurrentStackPage) {
return
}
loadZone()
}
}
Connections
{
target: dataModel
onSessionValid: {
if (!isCurrentStackPage) {
return
}
if(valid){
navStack.clearAndPush(mainPage)
}else{
navStack.clearAndPush(loginPage)
}
}
}