Avoid to remove file on cancelling upload

This commit is contained in:
Julien Wadel 2024-03-08 21:21:26 +01:00
parent 019be99e62
commit 1a8c0fa806
2 changed files with 3 additions and 6 deletions

View file

@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Network remote file can be used in chat attachment on Windows.
- Crash on forwarding a message to a new secure chat room.
- URI handlers and remote provisioning.
- Avoid to remove file on cancelling upload and fix cancelling file transfers.
- Update SDK to 5.3.26.
### Added

View file

@ -207,11 +207,7 @@ void ContentModel::downloadFile(){
}
void ContentModel::cancelDownloadFile(){
if(mChatMessageModel && mChatMessageModel->getChatMessage()) {
if(mChatMessageModel->isOutgoing() ){
mChatMessageModel->deleteEvent();// Uploading is cancelling : Delete event to have clean history.
emit mChatMessageModel->remove(mChatMessageModel);
}else
mChatMessageModel->getChatMessage()->cancelFileTransfer();
mChatMessageModel->getChatMessage()->cancelFileTransfer();
}
}
@ -257,4 +253,4 @@ bool ContentModel::saveAs (const QString& path){
}
void ContentModel::updateTransferData(){
}
}