mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 07:52:57 +02:00
parent
a21b6d7416
commit
f2867df340
1 changed files with 7 additions and 9 deletions
|
@ -4230,20 +4230,18 @@ void ApiWrap::sendFiles(
|
||||||
auto tasks = std::vector<std::unique_ptr<Task>>();
|
auto tasks = std::vector<std::unique_ptr<Task>>();
|
||||||
tasks.reserve(list.files.size());
|
tasks.reserve(list.files.size());
|
||||||
for (auto &file : list.files) {
|
for (auto &file : list.files) {
|
||||||
if (album) {
|
const auto uploadWithType = !album
|
||||||
if (file.type == Ui::PreparedFile::Type::Photo
|
? type
|
||||||
&& type != SendMediaType::File) {
|
: (file.type == Ui::PreparedFile::Type::Photo
|
||||||
type = SendMediaType::Photo;
|
&& type != SendMediaType::File)
|
||||||
} else {
|
? SendMediaType::Photo
|
||||||
type = SendMediaType::File;
|
: SendMediaType::File;
|
||||||
}
|
|
||||||
}
|
|
||||||
tasks.push_back(std::make_unique<FileLoadTask>(
|
tasks.push_back(std::make_unique<FileLoadTask>(
|
||||||
&session(),
|
&session(),
|
||||||
file.path,
|
file.path,
|
||||||
file.content,
|
file.content,
|
||||||
std::move(file.information),
|
std::move(file.information),
|
||||||
type,
|
uploadWithType,
|
||||||
to,
|
to,
|
||||||
caption,
|
caption,
|
||||||
album));
|
album));
|
||||||
|
|
Loading…
Add table
Reference in a new issue