2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

next layer, stickerdata moved from documentdata

This commit is contained in:
John Preston
2015-05-11 15:44:27 +03:00
parent 9761c5bb56
commit cfb0de69f0
15 changed files with 668 additions and 91 deletions

View File

@@ -402,6 +402,15 @@ public:
void onClick(Qt::MouseButton button) const;
};
struct StickerData {
StickerData() : set(MTP_inputStickerSetEmpty()) {
}
ImagePtr img;
QString alt;
MTPInputStickerSet set;
};
enum DocumentType {
FileDocument,
VideoDocument,
@@ -415,7 +424,7 @@ struct DocumentData {
void forget() {
thumb->forget();
sticker->forget();
if (sticker) sticker->img->forget();
replyPreview->forget();
}
@@ -444,6 +453,9 @@ struct DocumentData {
loader->rpcInvalidate();
loader = 0;
}
~DocumentData() {
delete sticker;
}
QString already(bool check = false);
@@ -453,7 +465,7 @@ struct DocumentData {
int32 duration;
uint64 access;
int32 date;
QString name, mime, alt; // alt - for stickers
QString name, mime;
ImagePtr thumb, replyPreview;
int32 dc;
int32 size;
@@ -466,7 +478,7 @@ struct DocumentData {
FileLocation location;
QByteArray data;
ImagePtr sticker;
StickerData *sticker;
int32 md5[8];
};