incorporate erinn's feebback so android back button interacts with stack!
the build was successful Details

This commit is contained in:
Dan Ballard 2019-09-13 16:16:52 -07:00
parent a2b3e2b4fd
commit 049087c080
2 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@ type CwtchActivity struct {
_ func(string) `slot:"updateAndroidNotification"`
_ func() `signal:"rootHomeButtonHandle,auto""`
_ func() `signal:"rootHomeButtonHandle,auto"`
}
func (c *CwtchActivity) init() {

View File

@ -200,7 +200,13 @@ ApplicationWindow {
Keys.onPressed: {
if (event.key == Qt.Key_Back) {
event.accepted = true
androidCwtchActivity.rootHomeButtonHandle()
if (theStack.currentIndex == theStack.emptyPane) {
androidCwtchActivity.rootHomeButtonHandle()
} else if (theStack.currentIndex == theStack.userProfilePane || theStack.currentIndex == theStack.groupProfilePane) {
theStack.currentIndex = theStack.messagePane
} else {
theStack.currentIndex = theStack.emptyPane
}
}
}
}