Commit 0900ea14 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

ContactsPage: Use Kirigami DelegateRecycler

parent 7cbd3edd
......@@ -89,33 +89,40 @@ Kirigami.ScrollablePage {
sortOrder: Qt.AscendingOrder
}
// model.display, model.decoration, model.phoneNumber
delegate: ContactListItem {
height: Kirigami.Units.gridUnit * 3
name: model.display
icon: model.decoration
personUri: model.personUri
Component {
id: contactListDelegate
ContactListItem {
height: Kirigami.Units.gridUnit * 3
name: model.display
icon: model.decoration
personUri: model.personUri
actions: [
Kirigami.Action {
icon.name: "mail-message"
onTriggered: {
personActions.triggerAction(KPeople.TextChatAction)
actions: [
Kirigami.Action {
icon.name: "mail-message"
onTriggered: {
personActions.triggerAction(KPeople.TextChatAction)
}
},
Kirigami.Action {
icon.name: "call-start"
onTriggered: {
personActions.triggerAction(KPeople.AudioCallAction)
}
}
},
Kirigami.Action {
icon.name: "call-start"
onTriggered: {
personActions.triggerAction(KPeople.AudioCallAction)
}
}
]
]
onClicked: {
pageStack.push(detailPage, {
personUri: model.personUri
})
onClicked: {
pageStack.push(detailPage, {
personUri: model.personUri
})
}
}
}
delegate: Kirigami.DelegateRecycler {
width: parent.width
sourceComponent: contactListDelegate
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment