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

Show nice thumbnails for paid albums.

This commit is contained in:
John Preston
2024-06-24 14:48:47 +04:00
parent dfc422b505
commit 90dfae52f5
7 changed files with 187 additions and 88 deletions

View File

@@ -19,6 +19,16 @@ struct CreditTopupOption final {
using CreditTopupOptions = std::vector<CreditTopupOption>;
enum class CreditsHistoryMediaType {
Photo,
Video,
};
struct CreditsHistoryMedia {
CreditsHistoryMediaType type = CreditsHistoryMediaType::Photo;
uint64 id = 0;
};
struct CreditsHistoryEntry final {
using PhotoId = uint64;
enum class PeerType {
@@ -30,21 +40,13 @@ struct CreditsHistoryEntry final {
PremiumBot,
Ads,
};
enum class MediaType {
Photo,
Video,
};
struct Media {
MediaType type = MediaType::Photo;
uint64 mediaId = 0;
};
QString id;
QString title;
QString description;
QDateTime date;
PhotoId photoId = 0;
std::vector<Media> extended;
std::vector<CreditsHistoryMedia> extended;
uint64 credits = 0;
uint64 bareMsgId = 0;
uint64 barePeerId = 0;