blob: 6bf76ecf974613f1dde825bfbd0618ace51e928a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace HistoryView {
struct ItemPreviewImage {
QImage data;
uint64 cacheKey = 0;
explicit operator bool() const {
return !data.isNull();
}
};
struct ItemPreview {
TextWithEntities text;
std::vector<ItemPreviewImage> images;
int arrowInTextPosition = -1;
int imagesInTextPosition = 0;
std::any loadingContext;
};
struct ToPreviewOptions {
const std::vector<ItemPreviewImage> *existing = nullptr;
bool hideSender = false;
bool hideCaption = false;
bool generateImages = true;
bool ignoreGroup = false;
bool ignoreTopic = true;
};
} // namespace HistoryView
|