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) }) }