From 1329870c8e4135d450f99c6c8f2023c375492c4c Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 15 Apr 2020 12:11:09 +0400 Subject: [PATCH] Fix build on macOS. --- Telegram/SourceFiles/platform/mac/mac_touchbar.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/mac/mac_touchbar.mm b/Telegram/SourceFiles/platform/mac/mac_touchbar.mm index 119737cc8c..985faa33e0 100644 --- a/Telegram/SourceFiles/platform/mac/mac_touchbar.mm +++ b/Telegram/SourceFiles/platform/mac/mac_touchbar.mm @@ -17,6 +17,7 @@ #include "core/application.h" #include "core/sandbox.h" #include "data/data_document.h" +#include "data/data_document_media.h" #include "data/data_file_origin.h" #include "data/data_folder.h" #include "data/data_peer_values.h" @@ -656,6 +657,7 @@ void AppendEmojiPacks(std::vector &to) { @implementation PickerScrubberItemView { rpl::lifetime _lifetime; QSize _dimensions; + std::shared_ptr _media; Image *_image; @public Data::FileOrigin fileOrigin; @@ -675,11 +677,12 @@ void AppendEmojiPacks(std::vector &to) { return self; } -- (void)addDocument:(DocumentData *)document { +- (void)addDocument:(not_null)document { if (!document->sticker()) { return; } - _image = document->getStickerSmall(); + _media = document->createMediaView(); + _image = _media->getStickerSmall(); if (!_image) { return; }