mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-20 04:32:50 +02:00
Fixed order of saving grouped media from bulk download menu item.
This commit is contained in:
parent
a0a8d76441
commit
b97c8b9a17
1 changed files with 6 additions and 2 deletions
|
@ -242,10 +242,14 @@ void AddDownloadFilesAction(
|
|||
if (items.empty()) {
|
||||
return;
|
||||
}
|
||||
auto sortedItems = ranges::views::all(items)
|
||||
| ranges::views::keys
|
||||
| ranges::to<std::vector>();
|
||||
ranges::sort(sortedItems, {}, &HistoryItem::fullId);
|
||||
auto docs = Documents();
|
||||
auto photos = Photos();
|
||||
for (const auto &pair : items) {
|
||||
if (!Added(pair.first, docs, photos)) {
|
||||
for (const auto &item : sortedItems) {
|
||||
if (!Added(item, docs, photos)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue