return to call history on end call

This commit is contained in:
Gaelle Braud 2024-07-04 13:14:18 +02:00
parent 7fe1129ea7
commit fa259d2a31
4 changed files with 16 additions and 0 deletions

View file

@ -73,6 +73,8 @@ AppWindow {
function endCall(callToFinish) {
if (callToFinish) callToFinish.core.lTerminate()
var mainWin = UtilsCpp.getMainWindow()
mainWin.goToCallHistory()
}
function callEnded(call){
if (call.core.state === LinphoneEnums.CallState.Error) {

View file

@ -20,12 +20,17 @@ Item {
signal addAccountRequest()
signal openNewCall()
signal openCallHistory()
signal createContactRequested(string name, string address)
function goToNewCall() {
tabbar.currentIndex = 0
mainItem.openNewCall()
}
function goToCallHistory() {
tabbar.currentIndex = 0
mainItem.openCallHistory()
}
function createContact(name, address) {
tabbar.currentIndex = 1
@ -370,6 +375,7 @@ Item {
Connections {
target: mainItem
onOpenNewCall: callPage.goToNewCall()
onOpenCallHistory: callPage.goToCallHistory()
}
onCreateContactRequested: (name, address) => {
mainItem.createContact(name, address)

View file

@ -24,6 +24,11 @@ AppWindow {
// color: DefaultStyle.grey_100
// }
function goToCallHistory() {
console.log("go to call history")
mainWindowStackView.replace(mainPage, StackView.Immediate)
mainWindowStackView.currentItem.goToCallHistory()
}
function goToNewCall() {
mainWindowStackView.replace(mainPage, StackView.Immediate)
mainWindowStackView.currentItem.goToNewCall()

View file

@ -50,6 +50,9 @@ AbstractMainPage {
function goToNewCall() {
listStackView.push(newCallItem)
}
function goToCallHistory() {
listStackView.pop()
}
Dialog {
id: deleteHistoryPopup