mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-22 07:49:56 -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 > 1 ? "messages" : "message")
|
||||
.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,9 +481,26 @@ ApplicationWindow
|
||||
|
||||
function openContactsViewLinkHandler (uriStr)
|
||||
{
|
||||
console.log("openContactsViewLinkHandler(uriStr)" , uriStr)
|
||||
if(coreReady)
|
||||
{
|
||||
stackView.push("qrc:/Contacts.qml" )
|
||||
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" )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user