mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-20 23:27:23 +00:00
Removed sending gif attributes when edit media.
- Removed handling gif for render animated preview.
This commit is contained in:
parent
89e1291d86
commit
741501d1d9
@ -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,
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user