mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-04 12:21:04 -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
|
property string gxs_id
|
||||||
|
|
||||||
|
|
||||||
height: 130
|
height: 130
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ Item
|
|||||||
property int avatarAttemptCnt: 0
|
property int avatarAttemptCnt: 0
|
||||||
function getDetails()
|
function getDetails()
|
||||||
{
|
{
|
||||||
|
console.log("getDetails() ", compRoot.gxs_id )
|
||||||
++compRoot.avatarAttemptCnt
|
++compRoot.avatarAttemptCnt
|
||||||
rsApi.request(
|
rsApi.request(
|
||||||
"/identity/get_identity_details",
|
"/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()
|
Component.onCompleted: if(visible && !has_avatar) getDetails()
|
||||||
onVisibleChanged: if(visible && !has_avatar) getDetails()
|
onVisibleChanged: if(visible && !has_avatar) getDetails()
|
||||||
|
|
||||||
@ -73,4 +90,10 @@ Item
|
|||||||
visible: !compRoot.has_avatar
|
visible: !compRoot.has_avatar
|
||||||
hash: compRoot.gxs_id
|
hash: compRoot.gxs_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MouseArea
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: showDetails()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user