mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Added Data class for boosts.
This commit is contained in:
parent
a6e13a9f9e
commit
7ee2ec13f0
2 changed files with 44 additions and 0 deletions
|
@ -453,6 +453,7 @@ PRIVATE
|
||||||
data/data_audio_msg_id.h
|
data/data_audio_msg_id.h
|
||||||
data/data_auto_download.cpp
|
data/data_auto_download.cpp
|
||||||
data/data_auto_download.h
|
data/data_auto_download.h
|
||||||
|
data/data_boosts.h
|
||||||
data/data_bot_app.cpp
|
data/data_bot_app.cpp
|
||||||
data/data_bot_app.h
|
data/data_bot_app.h
|
||||||
data/data_chat.cpp
|
data/data_chat.cpp
|
||||||
|
|
43
Telegram/SourceFiles/data/data_boosts.h
Normal file
43
Telegram/SourceFiles/data/data_boosts.h
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
/*
|
||||||
|
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 isBoosted = false;
|
||||||
|
int level = 0;
|
||||||
|
int boostCount = 0;
|
||||||
|
int currentLevelBoostCount = 0;
|
||||||
|
int nextLevelBoostCount = 0;
|
||||||
|
int premiumMemberCount = 0;
|
||||||
|
float64 premiumMemberPercentage = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Boost final {
|
||||||
|
UserId userId = UserId(0);
|
||||||
|
QDateTime expirationDate;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BoostsListSlice final {
|
||||||
|
struct OffsetToken final {
|
||||||
|
QString next;
|
||||||
|
};
|
||||||
|
std::vector<Boost> list;
|
||||||
|
int total = 0;
|
||||||
|
bool allLoaded = false;
|
||||||
|
OffsetToken token;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct BoostStatus final {
|
||||||
|
BoostsOverview overview;
|
||||||
|
BoostsListSlice firstSlice;
|
||||||
|
QString link;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace Data
|
Loading…
Add table
Reference in a new issue