mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-13 08:35:45 -04:00
qml-app: Fix responsiveness of ChatView
ChatHandler::handleMessages(...) tick() before repling so the raw message queue is processed ChatHandler::handleLobbies(...) make sure tick() is called without previous mutex locking, putting the critical section inside a block ChatView.qml remove unnecessary request to statetoken service that slowed down processing by half, increased chat message refresh time to reduce performance hit
This commit is contained in:
parent
1fa20e16c2
commit
6c6b437db1
3 changed files with 20 additions and 15 deletions
|
@ -7,11 +7,7 @@ Item
|
|||
id: chatView
|
||||
property string chatId
|
||||
|
||||
function refreshData()
|
||||
{
|
||||
rsApi.request("/statetokenservice/*")
|
||||
rsApi.request("/chat/messages/"+ chatId, "", function(par) { console.log("Callback called! -> " + par.response ); chatModel.json = par.response })
|
||||
}
|
||||
function refreshData() { rsApi.request("/chat/messages/"+ chatId, "", function(par) { chatModel.json = par.response }) }
|
||||
|
||||
onFocusChanged: focus && refreshData()
|
||||
|
||||
|
@ -84,7 +80,7 @@ Item
|
|||
Timer
|
||||
{
|
||||
id: refreshTimer
|
||||
interval: 500
|
||||
interval: 800
|
||||
repeat: true
|
||||
onTriggered: if(chatView.visible) chatView.refreshData()
|
||||
Component.onCompleted: start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue