Update download state on automatic/manual file downloads.

This commit is contained in:
Julien Wadel 2022-07-04 17:26:51 +02:00
parent 4fd6166670
commit 243435ae2c

View file

@ -299,6 +299,15 @@ void ChatMessageModel::onFileTransferProgressIndication (const std::shared_ptr<l
void ChatMessageModel::onMsgStateChanged (const std::shared_ptr<linphone::ChatMessage> &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<ContentModel>())
allAreDownloaded &= content->mWasDownloaded;
setWasDownloaded(allAreDownloaded);
}
}
emit stateChanged();
}
void ChatMessageModel::onParticipantImdnStateChanged(const std::shared_ptr<linphone::ChatMessage> & message, const std::shared_ptr<const linphone::ParticipantImdnState> & state){