2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Slightly refactored uploading of edit media.

This commit is contained in:
23rd
2021-03-09 12:11:40 +03:00
parent bbeb9d3950
commit d4bb62d055
11 changed files with 35 additions and 41 deletions

View File

@@ -1045,13 +1045,13 @@ void EditCaptionBox::save() {
if (!_preparedList.files.empty()) {
auto action = Api::SendAction(item->history());
action.options = options;
action.replaceMediaOf = item->fullId().msg;
_controller->session().api().editMedia(
std::move(_preparedList),
(!_asFile && _photo) ? SendMediaType::Photo : SendMediaType::File,
_field->getTextWithAppliedMarkdown(),
action,
item->fullId().msg);
action);
closeBox();
return;
}