From 052951028f74eb031f4b0a03300d9e54897b7b21 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Tue, 9 Apr 2024 16:56:18 +0200 Subject: [PATCH] File permission after auto downloading a file. --- CHANGELOG.md | 5 +++++ .../src/components/chat-events/ChatMessageModel.cpp | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4858a886..e036e3db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Screen Sharing +## 5.2.4 - undefined + +### Fixed +- File permission after auto downloading a file. + ## 5.2.3 - 2024-03-29 ### Fixed diff --git a/linphone-app/src/components/chat-events/ChatMessageModel.cpp b/linphone-app/src/components/chat-events/ChatMessageModel.cpp index 18b94c42d..16537c318 100644 --- a/linphone-app/src/components/chat-events/ChatMessageModel.cpp +++ b/linphone-app/src/components/chat-events/ChatMessageModel.cpp @@ -320,7 +320,12 @@ void ChatMessageModel::onFileTransferProgressIndication (const std::shared_ptrgetSharedList()) allAreDownloaded &= content->mWasDownloaded; setWasDownloaded(allAreDownloaded); - App::getInstance()->getNotifier()->notifyReceivedFileMessage(message, content); + QTimer::singleShot(60, App::getInstance(), + [message, content]() { // on 100% downlaoded, the SDK still need to do stuff on file. It + // still need permission on file. Let the application to use the + // file after next iteration. + App::getInstance()->getNotifier()->notifyReceivedFileMessage(message, content); + }); } } }