diff --git a/retroshare-qml-app/src/ChatView.qml b/retroshare-qml-app/src/ChatView.qml index cbb5b86f6..3990069fd 100644 --- a/retroshare-qml-app/src/ChatView.qml +++ b/retroshare-qml-app/src/ChatView.qml @@ -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() diff --git a/retroshare-qml-app/src/Contacts.qml b/retroshare-qml-app/src/Contacts.qml index e1e312319..f16196c8d 100644 --- a/retroshare-qml-app/src/Contacts.qml +++ b/retroshare-qml-app/src/Contacts.qml @@ -101,6 +101,10 @@ Item TokensManager.registerToken(json.statetoken, refreshUnread) contactsSortWorker.sendMessage( {'action': 'refreshUnread', 'response': par.response}) + json.data.forEach (function (chat){ + console.log("@@@@@@@@@@@@ ",chat.chat_id) + ChatCache.lastMessageCache.updateLastMessageCache(chat.chat_id) + }) } function refreshUnread() { @@ -187,4 +191,5 @@ Item property bool defaultIdentityCreated: false } + }