From a7fb49c552a96a4f4709363a708b722e66fd343e Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Fri, 22 Jun 2018 15:27:59 -0400 Subject: Add support for PBAP RecentCallModel Replace static data and history currently used in phone app with data populated the the BT PBAP binding. This data is parsed and exposed to QML by the RecentCallModel in libqtappfw. The recent call tab and the mini-recent call bar in the dialer tab now show actual call history from the connected mobile phone. Bug-AGL: SPEC-1436 Change-Id: I287a1daf54ee88985aac85d71215f7fa4e766556 Signed-off-by: Matt Porter --- app/Dialer.qml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/Dialer.qml') diff --git a/app/Dialer.qml b/app/Dialer.qml index 29f251f..d88ddcc 100644 --- a/app/Dialer.qml +++ b/app/Dialer.qml @@ -160,7 +160,6 @@ Item { var contact = {'name': name.text, 'number': number.text} if (contact.name === '') contact.name = 'Unknown' - history.insert(0, contact) if (telephony.callState == "incoming") { telephony.answer() } else { @@ -192,7 +191,7 @@ Item { Layout.preferredHeight: 130 orientation: Qt.Horizontal clip: true - model: CallHistoryModel { id: history } + model: RecentCallModel delegate: MouseArea { width: root.width / 2.5 @@ -207,17 +206,17 @@ Item { Label { Layout.fillWidth: true color: '#59FF7F' - text: model.name + text: model.modelData.name } Label { Layout.fillWidth: true font.pixelSize: 30 - text: model.number + text: model.modelData.number } } } - onClicked: root.call(model) + onClicked: root.call(model.modelData.name, model.modelData.number) } } } -- cgit 1.2.3-korg