init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
This commit is contained in:
73
Telegram/SourceFiles/data/data_boosts.h
Normal file
73
Telegram/SourceFiles/data/data_boosts.h
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
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 Data {
|
||||
|
||||
struct BoostsOverview final {
|
||||
bool group = false;
|
||||
int mine = 0;
|
||||
int level = 0;
|
||||
int boostCount = 0;
|
||||
int currentLevelBoostCount = 0;
|
||||
int nextLevelBoostCount = 0;
|
||||
int premiumMemberCount = 0;
|
||||
float64 premiumMemberPercentage = 0;
|
||||
};
|
||||
|
||||
struct GiftCodeLink final {
|
||||
QString text;
|
||||
QString link;
|
||||
QString slug;
|
||||
};
|
||||
|
||||
struct Boost final {
|
||||
QString id;
|
||||
UserId userId = UserId(0);
|
||||
FullMsgId giveawayMessage;
|
||||
QDateTime date;
|
||||
QDateTime expiresAt;
|
||||
int expiresAfterMonths = 0;
|
||||
GiftCodeLink giftCodeLink;
|
||||
int multiplier = 0;
|
||||
uint64 credits = 0;
|
||||
|
||||
bool isGift = false;
|
||||
bool isGiveaway = false;
|
||||
bool isUnclaimed = false;
|
||||
};
|
||||
|
||||
struct BoostsListSlice final {
|
||||
struct OffsetToken final {
|
||||
QString next;
|
||||
bool gifts = false;
|
||||
};
|
||||
std::vector<Boost> list;
|
||||
int multipliedTotal = 0;
|
||||
bool allLoaded = false;
|
||||
OffsetToken token;
|
||||
};
|
||||
|
||||
struct BoostPrepaidGiveaway final {
|
||||
QDateTime date;
|
||||
uint64 id = 0;
|
||||
uint64 credits = 0;
|
||||
int months = 0;
|
||||
int quantity = 0;
|
||||
int boosts = 0;
|
||||
};
|
||||
|
||||
struct BoostStatus final {
|
||||
BoostsOverview overview;
|
||||
BoostsListSlice firstSliceBoosts;
|
||||
BoostsListSlice firstSliceGifts;
|
||||
std::vector<BoostPrepaidGiveaway> prepaidGiveaway;
|
||||
QString link;
|
||||
};
|
||||
|
||||
} // namespace Data
|
||||
Reference in New Issue
Block a user