mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
Set a button to open chat from contact details
This commit is contained in:
parent
c27db173ce
commit
0ca3e35e33
1 changed files with 14 additions and 4 deletions
|
@ -33,15 +33,25 @@ Item
|
|||
{
|
||||
id: avatarPicker
|
||||
|
||||
text: "Change your Avatar"
|
||||
visible: isOwn
|
||||
text: (isOwn)? qsTr("Change your Avatar") : qsTr("Start Chat!")
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
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
|
||||
{
|
||||
|
@ -73,7 +83,7 @@ Item
|
|||
|
||||
gxs_id: cntDt.md.gxs_id
|
||||
|
||||
anchors.top: (isOwn)? avatarPicker.bottom : parent.top
|
||||
anchors.top: avatarPicker.bottom
|
||||
anchors.topMargin: 6
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue