diff --git a/CHANGELOG.md b/CHANGELOG.md index 50ba6c7eb..8a018782d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix using only username in URI handlers. - Chat flickering on load. - Color of busy indicator when the chat is loading. +- Incoming ephemerals weren't removed without reloading chat rooms. - Update SDK to 5.2.42 ### Added diff --git a/linphone-app/src/components/chat-room/ChatRoomModel.cpp b/linphone-app/src/components/chat-room/ChatRoomModel.cpp index 723baf764..4c1d84276 100644 --- a/linphone-app/src/components/chat-room/ChatRoomModel.cpp +++ b/linphone-app/src/components/chat-room/ChatRoomModel.cpp @@ -985,8 +985,11 @@ void ChatRoomModel::initEntries(){ qDebug() << "Internal Entries : Built"; if(entries.size() >0){ beginInsertRows(QModelIndex(),0, entries.size()-1); - for(auto e : entries) + for(auto e : entries) { + if( e->mType == ChatRoomModel::EntryType::MessageEntry) + connect(e.objectCast().get(), &ChatMessageModel::remove, this, &ChatRoomModel::removeEntry); mList.push_back(e); + } endInsertRows(); updateNewMessageNotice(mChatRoom->getUnreadMessagesCount()); }