2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Added initial box for premium gifts.

This commit is contained in:
23rd
2022-07-03 17:56:12 +03:00
committed by John Preston
parent 2a3d72ad2e
commit c7c8ebed13
14 changed files with 407 additions and 5 deletions

View File

@@ -617,7 +617,8 @@ SessionController::SessionController(
, _activeChatsFilter(session->data().chatsFilters().defaultId())
, _defaultChatTheme(std::make_shared<Ui::ChatTheme>())
, _chatStyle(std::make_unique<Ui::ChatStyle>())
, _cachedReactionIconFactory(std::make_unique<ReactionIconFactory>()) {
, _cachedReactionIconFactory(std::make_unique<ReactionIconFactory>())
, _giftPremiumValidator(GiftPremiumValidator(this)) {
init();
_chatStyleTheme = _defaultChatTheme;
@@ -748,6 +749,14 @@ void SessionController::showEditPeerBox(PeerData *peer) {
session().api().requestFullPeer(peer);
}
void SessionController::showGiftPremiumBox(UserData *user) {
if (user) {
_giftPremiumValidator.showBox(user);
} else {
_giftPremiumValidator.cancel();
}
}
void SessionController::init() {
if (session().supportMode()) {
initSupportMode();