mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Extract sticker-specific HistoryView code.
This commit is contained in:
@@ -769,7 +769,11 @@ std::unique_ptr<HistoryView::Media> MediaFile::createView(
|
||||
not_null<HistoryView::Element*> message,
|
||||
not_null<HistoryItem*> realParent) {
|
||||
if (_document->sticker()) {
|
||||
return std::make_unique<HistoryView::Sticker>(message, _document);
|
||||
return std::make_unique<HistoryView::UnwrappedMedia>(
|
||||
message,
|
||||
std::make_unique<HistoryView::StickerContent>(
|
||||
message,
|
||||
_document));
|
||||
} else if (_document->isAnimation()) {
|
||||
return std::make_unique<HistoryView::Gif>(message, _document);
|
||||
} else if (_document->isVideoFile()) {
|
||||
|
Reference in New Issue
Block a user