From 88b0ea70b3efb8e1153b1a971167f90d40d9a338 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 25 Nov 2022 16:41:01 +0300 Subject: [PATCH] Respected download manager when loading multiple files from menu. --- Telegram/SourceFiles/menu/menu_item_download_files.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/menu/menu_item_download_files.cpp b/Telegram/SourceFiles/menu/menu_item_download_files.cpp index 3354332836..bf122fb09f 100644 --- a/Telegram/SourceFiles/menu/menu_item_download_files.cpp +++ b/Telegram/SourceFiles/menu/menu_item_download_files.cpp @@ -84,7 +84,9 @@ void AddAction( : (downloadPath == u"tmp"_q) ? session->local().tempDirectory() : downloadPath; - if (path.isEmpty()) return; + if (path.isEmpty()) { + return; + } const auto fullPath = [&](int i) { return filedialogDefaultName( @@ -121,7 +123,9 @@ void AddAction( }; const auto saveDocuments = [=] { for (const auto &pair : documents) { - DocumentSaveClickHandler::Save(pair.second, pair.first->owner()); + DocumentSaveClickHandler::SaveAndTrack( + pair.second, + pair.first->owner()); } };