2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-24 19:27:17 +00:00
tdesktop/Telegram/SourceFiles/data/data_peer_common.h

35 lines
682 B
C
Raw Normal View History

2025-07-15 14:07:09 +04:00
/*
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 StarsRating {
int level = 0;
2025-07-31 22:20:00 +04:00
int stars = 0;
int thisLevelStars = 0;
2025-07-15 14:07:09 +04:00
int nextLevelStars = 0;
explicit operator bool() const {
2025-07-31 22:20:00 +04:00
return level != 0 || thisLevelStars != 0;
2025-07-15 14:07:09 +04:00
}
friend inline bool operator==(StarsRating, StarsRating) = default;
};
2025-08-01 16:13:15 +04:00
struct StarsRatingPending {
StarsRating value;
TimeId date = 0;
explicit operator bool() const {
return value && date;
}
};
2025-07-15 14:07:09 +04:00
} // namespace Data