Implement last message cache when a message is received

This commit is contained in:
Angela Mazzurco 2017-06-03 17:58:53 +02:00
parent 93c6a1a7e8
commit 464c16b825
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,7 @@ Item
property string chatId
property int token: 0
function refreshData()
{
console.log("chatView.refreshData()", visible)
@ -38,6 +39,8 @@ Item
token = JSON.parse(par.response).statetoken
TokensManager.registerToken(token, refreshData)
ChatCache.lastMessageCache.updateLastMessageCache(chatId, chatModel.json)
if(chatListView.visible)
{
chatListView.positionViewAtEnd()