From 0ebff280afb16e565b0d789be2090748305327f8 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 24 Jan 2022 13:10:20 +0100 Subject: [PATCH] Update MS2+log --- .../src/components/chat-room/ChatRoomModel.cpp | 2 ++ .../src/components/chat-room/ChatRoomProxyModel.cpp | 13 +++++++++---- linphone-sdk | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.cpp b/linphone-app/src/components/chat-room/ChatRoomModel.cpp index 83d7f46c8..59dabe375 100644 --- a/linphone-app/src/components/chat-room/ChatRoomModel.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomModel.cpp @@ -885,6 +885,7 @@ void ChatRoomModel::updateNewMessageNotice(const int& count){ } void ChatRoomModel::initEntries(){ + qInfo() << "Init entries"; // On call : reinitialize all entries. This allow to free up memory QList > entries; QList prepareEntries; @@ -920,6 +921,7 @@ void ChatRoomModel::initEntries(){ } int ChatRoomModel::loadMoreEntries(){ + qInfo() << "Load more entries"; QList > entries; QList prepareEntries; // Get current event count for each type diff --git a/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp b/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp index b5012e025..a8e335db9 100644 --- a/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomProxyModel.cpp @@ -270,7 +270,7 @@ QString ChatRoomProxyModel::getCachedText() const{ // ----------------------------------------------------------------------------- void ChatRoomProxyModel::reload (ChatRoomModel *chatRoomModel) { - + qInfo() << "Reloading"; if (mChatRoomModel) { ChatRoomModel *ChatRoomModel = mChatRoomModel.get(); QObject::disconnect(ChatRoomModel, &ChatRoomModel::isRemoteComposingChanged, this, &ChatRoomProxyModel::handleIsRemoteComposingChanged); @@ -301,6 +301,7 @@ void ChatRoomProxyModel::resetMessageCount(){ } void ChatRoomProxyModel::setFilterText(const QString& text){ + qInfo() << "setFilterText : " << text; if( mFilterText != text && mChatRoomModel){ mFilterText = text; int currentRowCount = rowCount(); @@ -319,9 +320,12 @@ ChatRoomModel *ChatRoomProxyModel::getChatRoomModel () const{ } void ChatRoomProxyModel::setChatRoomModel (ChatRoomModel *chatRoomModel){ - reload(chatRoomModel); - emit chatRoomModelChanged(); - emit isRemoteComposingChanged(); + if( mChatRoomModel.get() != chatRoomModel){ + qInfo() << "setChatRoomModel : " << mChatRoomModel.get() << "/" << chatRoomModel; + reload(chatRoomModel); + emit chatRoomModelChanged(); + emit isRemoteComposingChanged(); + } } // ----------------------------------------------------------------------------- @@ -339,6 +343,7 @@ void ChatRoomProxyModel::handleIsActiveChanged (QWindow *window) { if (markAsReadEnabled() && mChatRoomModel && window->isActive() && getParentWindow(this) == window) { auto timeline = CoreManager::getInstance()->getTimelineListModel()->getTimeline(mChatRoomModel->getChatRoom(), false); if(timeline && timeline->mSelected){ + qInfo() << "Active changed : reset message count and focused"; mChatRoomModel->resetMessageCount(); mChatRoomModel->focused(); } diff --git a/linphone-sdk b/linphone-sdk index 4114144fa..a0aa14ebd 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit 4114144fac5b39dab25fa3d1bf819e6466c9f929 +Subproject commit a0aa14ebd59aaee88ba56255ebff5a846f2cc13d