diff --git a/linphone-app/src/components/chat-events/ChatMessageModel.cpp b/linphone-app/src/components/chat-events/ChatMessageModel.cpp index bdbb5160b..f5cfc878e 100644 --- a/linphone-app/src/components/chat-events/ChatMessageModel.cpp +++ b/linphone-app/src/components/chat-events/ChatMessageModel.cpp @@ -334,6 +334,15 @@ void ChatMessageModel::onFileTransferProgressIndication (const std::shared_ptr &message, linphone::ChatMessage::State state) { updateFileTransferInformation();// On message state, file transfert information Content can be changed + if( state == linphone::ChatMessage::State::FileTransferDone) { + mContentListModel->updateContents(this);// Avoid having leak contents + if( !mWasDownloaded){// Update states + bool allAreDownloaded = true; + for(auto content : mContentListModel->getContents()) + allAreDownloaded &= content->mWasDownloaded; + setWasDownloaded(allAreDownloaded); + } + } emit stateChanged(); } void ChatMessageModel::onParticipantImdnStateChanged(const std::shared_ptr & message, const std::shared_ptr & state){