Incoming ephemerals weren't removed without reloading chat rooms (missing connection)

This commit is contained in:
Julien Wadel 2023-03-29 17:52:39 +02:00
parent eec2e2a769
commit 30d5fcd071
2 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -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<ChatMessageModel>().get(), &ChatMessageModel::remove, this, &ChatRoomModel::removeEntry);
mList.push_back(e);
}
endInsertRows();
updateNewMessageNotice(mChatRoom->getUnreadMessagesCount());
}