Solve variable names incoherences

This commit is contained in:
Angela Mazzurco 2017-06-03 18:09:52 +02:00
parent 464c16b825
commit 549b76141a
2 changed files with 3 additions and 4 deletions

View File

@ -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]
}
}

View File

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