mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Set a button to open chat from contact details
This commit is contained in:
parent
c27db173ce
commit
0ca3e35e33
@ -33,15 +33,25 @@ Item
|
|||||||
{
|
{
|
||||||
id: avatarPicker
|
id: avatarPicker
|
||||||
|
|
||||||
text: "Change your Avatar"
|
text: (isOwn)? qsTr("Change your Avatar") : qsTr("Start Chat!")
|
||||||
visible: isOwn
|
|
||||||
|
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
fileChooser.open()
|
if (isOwn) fileChooser.open()
|
||||||
|
else startDistantChat ()
|
||||||
|
}
|
||||||
|
function startDistantChat ()
|
||||||
|
{
|
||||||
|
ChatCache.chatHelper.startDistantChat(ChatCache.contactsCache.own.gxs_id,
|
||||||
|
cntDt.md.gxs_id,
|
||||||
|
cntDt.md.name,
|
||||||
|
function (chatId)
|
||||||
|
{
|
||||||
|
stackView.push("qrc:/ChatView.qml", {'chatId': chatId})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
CustomFileChooser
|
CustomFileChooser
|
||||||
{
|
{
|
||||||
@ -73,7 +83,7 @@ Item
|
|||||||
|
|
||||||
gxs_id: cntDt.md.gxs_id
|
gxs_id: cntDt.md.gxs_id
|
||||||
|
|
||||||
anchors.top: (isOwn)? avatarPicker.bottom : parent.top
|
anchors.top: avatarPicker.bottom
|
||||||
anchors.topMargin: 6
|
anchors.topMargin: 6
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user