From 549b76141af8e7a0cfdb9a3c1dfbf6ed07226bc2 Mon Sep 17 00:00:00 2001 From: Angela Mazzurco Date: Sat, 3 Jun 2017 18:09:52 +0200 Subject: [PATCH] Solve variable names incoherences --- retroshare-qml-app/src/ChatCache.qml | 6 +++--- retroshare-qml-app/src/Contacts.qml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/retroshare-qml-app/src/ChatCache.qml b/retroshare-qml-app/src/ChatCache.qml index d808d59b8..5abb0c26c 100644 --- a/retroshare-qml-app/src/ChatCache.qml +++ b/retroshare-qml-app/src/ChatCache.qml @@ -26,13 +26,13 @@ QtObject { } function updateLastMessage (chatId, chatModel){ - var lastMessage = getLastMessage (chatModel) + console.log("updateLastMessage (chatId, chatModel)") + var lastMessage = getLastMessageFromChat (chatModel) lastMessageList[chatId] = lastMessage } function getLastMessageFromChat (chatModel){ - console.log("getLastMessage (chatMessages)") - var messagesData = JSON.parse(chatMessages).data + var messagesData = JSON.parse(chatModel).data return messagesData.slice(-1)[0] } } diff --git a/retroshare-qml-app/src/Contacts.qml b/retroshare-qml-app/src/Contacts.qml index f16196c8d..995d2d5d9 100644 --- a/retroshare-qml-app/src/Contacts.qml +++ b/retroshare-qml-app/src/Contacts.qml @@ -102,7 +102,6 @@ Item contactsSortWorker.sendMessage( {'action': 'refreshUnread', 'response': par.response}) json.data.forEach (function (chat){ - console.log("@@@@@@@@@@@@ ",chat.chat_id) ChatCache.lastMessageCache.updateLastMessageCache(chat.chat_id) }) }