mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-30 09:56:14 -05:00
Open contact details on click the area
This commit is contained in:
parent
1b9a1f5087
commit
923c0c6da3
@ -25,6 +25,7 @@ Item
|
||||
|
||||
property string gxs_id
|
||||
|
||||
|
||||
height: 130
|
||||
width: height
|
||||
|
||||
@ -35,6 +36,7 @@ Item
|
||||
property int avatarAttemptCnt: 0
|
||||
function getDetails()
|
||||
{
|
||||
console.log("getDetails() ", compRoot.gxs_id )
|
||||
++compRoot.avatarAttemptCnt
|
||||
rsApi.request(
|
||||
"/identity/get_identity_details",
|
||||
@ -57,6 +59,21 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
function showDetails()
|
||||
{
|
||||
console.log("showDetails() ", gxs_id)
|
||||
rsApi.request(
|
||||
"/identity/get_identity_details",
|
||||
JSON.stringify({ gxs_id: compRoot.gxs_id }),
|
||||
function(par)
|
||||
{
|
||||
var jData = JSON.parse(par.response).data
|
||||
stackView.push(
|
||||
"qrc:/ContactDetails.qml",
|
||||
{md: jData})
|
||||
})
|
||||
}
|
||||
|
||||
Component.onCompleted: if(visible && !has_avatar) getDetails()
|
||||
onVisibleChanged: if(visible && !has_avatar) getDetails()
|
||||
|
||||
@ -73,4 +90,10 @@ Item
|
||||
visible: !compRoot.has_avatar
|
||||
hash: compRoot.gxs_id
|
||||
}
|
||||
|
||||
MouseArea
|
||||
{
|
||||
anchors.fill: parent
|
||||
onClicked: showDetails()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user