mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 03:16:18 -05:00
Use contacts cache to show contacts details
This commit is contained in:
parent
05ca5b482c
commit
c2b63a2313
@ -51,6 +51,7 @@ Item
|
|||||||
{
|
{
|
||||||
console.log("contactsView.refreshContactsCB()", visible)
|
console.log("contactsView.refreshContactsCB()", visible)
|
||||||
var token = JSON.parse(par.response).statetoken
|
var token = JSON.parse(par.response).statetoken
|
||||||
|
ChatCache.contactsCache.contactsList = JSON.parse(par.response).data
|
||||||
TokensManager.registerToken(token, refreshContacts)
|
TokensManager.registerToken(token, refreshContacts)
|
||||||
contactsSortWorker.sendMessage(
|
contactsSortWorker.sendMessage(
|
||||||
{'action': 'refreshContacts', 'response': par.response})
|
{'action': 'refreshContacts', 'response': par.response})
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
|
import "../" //Needed for Chat Cache
|
||||||
|
|
||||||
|
|
||||||
Item
|
Item
|
||||||
@ -62,16 +63,11 @@ Item
|
|||||||
function showDetails()
|
function showDetails()
|
||||||
{
|
{
|
||||||
console.log("showDetails() ", gxs_id)
|
console.log("showDetails() ", gxs_id)
|
||||||
rsApi.request(
|
|
||||||
"/identity/get_identity_details",
|
stackView.push(
|
||||||
JSON.stringify({ gxs_id: compRoot.gxs_id }),
|
"qrc:/ContactDetails.qml",
|
||||||
function(par)
|
{md: ChatCache.contactsCache.getContactFromGxsId(gxs_id)})
|
||||||
{
|
|
||||||
var jData = JSON.parse(par.response).data
|
|
||||||
stackView.push(
|
|
||||||
"qrc:/ContactDetails.qml",
|
|
||||||
{md: jData})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: if(visible && !has_avatar) getDetails()
|
Component.onCompleted: if(visible && !has_avatar) getDetails()
|
||||||
|
Loading…
Reference in New Issue
Block a user