Display round video messages using HistoryGif.

Use autodownload and autoplay options from GIFs.
Also improve EditCaptionBox code.
This commit is contained in:
John Preston
2017-04-02 13:25:54 +03:00
parent 8d28d0691f
commit 8eb7f1f1aa
16 changed files with 220 additions and 192 deletions

View File

@@ -119,6 +119,9 @@ DocumentData *Document::readFromStreamHelper(int streamAppVersion, QDataStream &
if (width > 0 && height > 0) {
if (duration >= 0) {
auto flags = MTPDdocumentAttributeVideo::Flags(0);
if (type == RoundVideoDocument) {
flags |= MTPDdocumentAttributeVideo::Flag::f_round_message;
}
attributes.push_back(MTP_documentAttributeVideo(MTP_flags(flags), MTP_int(duration), MTP_int(width), MTP_int(height)));
} else {
attributes.push_back(MTP_documentAttributeImageSize(MTP_int(width), MTP_int(height)));