Removed sending gif attributes when edit media.

- Removed handling gif for render animated preview.
This commit is contained in:
23rd 2019-03-29 15:28:46 +03:00 committed by John Preston
parent 89e1291d86
commit 741501d1d9
2 changed files with 4 additions and 11 deletions

View File

@ -4665,9 +4665,8 @@ void ApiWrap::editUploadedDocument(
| (thumb
? MTPDinputMediaUploadedDocument::Flag::f_thumb
: MTPDinputMediaUploadedDocument::Flag(0))
| (groupId
? MTPDinputMediaUploadedDocument::Flag::f_nosound_video
: MTPDinputMediaUploadedDocument::Flag(0));
// Never edit video as gif.
| MTPDinputMediaUploadedDocument::Flag::f_nosound_video;
const auto media = MTP_inputMediaUploadedDocument(
MTP_flags(flags),
file,

View File

@ -369,7 +369,6 @@ void EditCaptionBox::createEditMediaButton() {
_thumbw = _thumbh = _thumbx = 0;
_gifw = _gifh = _gifx = 0;
auto isGif = false;
_wayWrap->toggle(_isImage && _isNotAlbum, anim::type::instant);
using Info = FileMediaInformation;
@ -379,7 +378,8 @@ void EditCaptionBox::createEditMediaButton() {
} else if (const auto video =
base::get_if<Info::Video>(fileMedia)) {
_animated = true;
isGif = video->isGifv;
// Never edit video as gif.
video->isGifv = false;
} else {
auto nameString = filename;
if (const auto song =
@ -402,12 +402,6 @@ void EditCaptionBox::createEditMediaButton() {
_thumbw = _thumb.width();
_thumbh = _thumb.height();
_thumbx = (st::boxWideWidth - _thumbw) / 2;
if (isGif) {
_gifw = _thumbw;
_gifh = _thumbh;
_gifx = _thumbx;
prepareGifPreview();
}
}
captionResized();
}