mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-23 08:19:57 -05:00
Open chat when click notification of one chat new message
This commit is contained in:
parent
c86b7c79ae
commit
e39b310c78
@ -47,7 +47,11 @@ QtObject
|
|||||||
.arg(json.data[0].unread_count)
|
.arg(json.data[0].unread_count)
|
||||||
.arg(json.data[0].unread_count > 1 ? "messages" : "message")
|
.arg(json.data[0].unread_count > 1 ? "messages" : "message")
|
||||||
.arg(json.data[0].remote_author_name),
|
.arg(json.data[0].remote_author_name),
|
||||||
qsTr("/contacts")
|
qsTr("/contacts%1").arg(
|
||||||
|
convCnt == 1?
|
||||||
|
"?gxsId="+json.data[0].remote_author_id +
|
||||||
|
"&name="+json.data[0].remote_author_name
|
||||||
|
: "")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -481,11 +481,28 @@ ApplicationWindow
|
|||||||
|
|
||||||
function openContactsViewLinkHandler (uriStr)
|
function openContactsViewLinkHandler (uriStr)
|
||||||
{
|
{
|
||||||
|
console.log("openContactsViewLinkHandler(uriStr)" , uriStr)
|
||||||
if(coreReady)
|
if(coreReady)
|
||||||
|
{
|
||||||
|
var uri = new UriJs.URI(uriStr)
|
||||||
|
var query = UriJs.URI.parseQuery(uri.search());
|
||||||
|
if (query.gxsId && query.name)
|
||||||
|
{
|
||||||
|
|
||||||
|
ChatCache.chatHelper.startDistantChat(ChatCache.contactsCache.own.gxs_id,
|
||||||
|
query.gxsId,
|
||||||
|
query.name,
|
||||||
|
function (chatId)
|
||||||
|
{
|
||||||
|
stackView.push("qrc:/ChatView.qml", {'chatId': chatId})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
stackView.push("qrc:/Contacts.qml" )
|
stackView.push("qrc:/Contacts.qml" )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Popup
|
Popup
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user