Android Back button like home button #212
|
@ -15,7 +15,7 @@ type CwtchActivity struct {
|
|||
|
||||
_ func(string) `slot:"updateAndroidNotification"`
|
||||
|
||||
_ func() `signal:"rootHomeButtonHandle,auto""`
|
||||
_ func() `signal:"rootHomeButtonHandle,auto"`
|
||||
|
||||
}
|
||||
|
||||
func (c *CwtchActivity) init() {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue
remove double-double-quote near eol