From 923c0c6da37cd1fbcc5a476ee69b809972bce923 Mon Sep 17 00:00:00 2001 From: Angela Mazzurco Date: Wed, 21 Jun 2017 15:57:27 +0200 Subject: [PATCH] Open contact details on click the area --- .../src/components/AvatarOrColorHash.qml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/retroshare-qml-app/src/components/AvatarOrColorHash.qml b/retroshare-qml-app/src/components/AvatarOrColorHash.qml index 0cf09a9c4..0540b4627 100644 --- a/retroshare-qml-app/src/components/AvatarOrColorHash.qml +++ b/retroshare-qml-app/src/components/AvatarOrColorHash.qml @@ -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() + } }