2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Move sticker image to DocumentMedia.

This commit is contained in:
John Preston
2020-04-09 12:15:47 +04:00
parent bdd3c51ab8
commit 70c79eb6bd
14 changed files with 156 additions and 122 deletions

View File

@@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/flags.h"
class FileLoader;
namespace Data {
class DocumentMedia final {
@@ -22,6 +24,12 @@ public:
[[nodiscard]] Image *thumbnailInline() const;
void checkStickerLarge();
void checkStickerSmall();
[[nodiscard]] Image *getStickerSmall();
[[nodiscard]] Image *getStickerLarge();
void checkStickerLarge(not_null<FileLoader*> loader);
// For DocumentData.
static void CheckGoodThumbnail(not_null<DocumentData*> document);
@@ -38,6 +46,7 @@ private:
const not_null<DocumentData*> _owner;
std::unique_ptr<Image> _goodThumbnail;
mutable std::unique_ptr<Image> _inlineThumbnail;
std::unique_ptr<Image> _sticker;
Flags _flags;
};