diff --git a/linphone-app/src/components/chat-events/ChatMessageModel.cpp b/linphone-app/src/components/chat-events/ChatMessageModel.cpp index 0fb334ae5..b242a5e7a 100644 --- a/linphone-app/src/components/chat-events/ChatMessageModel.cpp +++ b/linphone-app/src/components/chat-events/ChatMessageModel.cpp @@ -299,6 +299,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->getSharedList()) + allAreDownloaded &= content->mWasDownloaded; + setWasDownloaded(allAreDownloaded); + } + } emit stateChanged(); } void ChatMessageModel::onParticipantImdnStateChanged(const std::shared_ptr & message, const std::shared_ptr & state){