mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Move gift_credits_box -> star_gift_box, strip old code.
This commit is contained in:
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "api/api_report.h"
|
||||
#include "menu/menu_check_item.h"
|
||||
#include "boxes/share_box.h"
|
||||
#include "boxes/star_gift_box.h"
|
||||
#include "chat_helpers/compose/compose_show.h"
|
||||
#include "chat_helpers/message_field.h"
|
||||
#include "chat_helpers/share_message_phrase_factory.h"
|
||||
@@ -1239,7 +1240,7 @@ void Filler::addGiftPremium() {
|
||||
|
||||
const auto navigation = _controller;
|
||||
_addAction(tr::lng_profile_gift_premium(tr::now), [=] {
|
||||
navigation->showGiftPremiumBox(user);
|
||||
Ui::ChooseStarGiftRecipient(navigation, [] {});
|
||||
}, &st::menuIconGiftPremium);
|
||||
}
|
||||
|
||||
|
@@ -1245,8 +1245,7 @@ SessionController::SessionController(
|
||||
, _activeChatsFilter(session->data().chatsFilters().defaultId())
|
||||
, _openedFolder(window->id().folder())
|
||||
, _defaultChatTheme(std::make_shared<Ui::ChatTheme>())
|
||||
, _chatStyle(std::make_unique<Ui::ChatStyle>(session->colorIndicesValue()))
|
||||
, _giftPremiumValidator(this) {
|
||||
, _chatStyle(std::make_unique<Ui::ChatStyle>(session->colorIndicesValue())) {
|
||||
init();
|
||||
|
||||
_chatStyleTheme = _defaultChatTheme;
|
||||
@@ -1470,24 +1469,6 @@ void SessionController::showEditPeerBox(PeerData *peer) {
|
||||
session().api().requestFullPeer(peer);
|
||||
}
|
||||
|
||||
void SessionController::showGiftPremiumBox(UserData *user) {
|
||||
if (user) {
|
||||
_giftPremiumValidator.showBox(user);
|
||||
} else {
|
||||
_giftPremiumValidator.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
void SessionController::showGiftPremiumsBox(const QString &ref) {
|
||||
_giftPremiumValidator.showChoosePeerBox(ref);
|
||||
}
|
||||
|
||||
void SessionController::showGiftPremiumsBox(
|
||||
not_null<UserData*> user,
|
||||
const QString &ref) {
|
||||
_giftPremiumValidator.showChosenPeerBox(user, ref);
|
||||
}
|
||||
|
||||
void SessionController::init() {
|
||||
if (session().supportMode()) {
|
||||
session().supportHelper().registerWindow(this);
|
||||
|
@@ -8,11 +8,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#pragma once
|
||||
|
||||
#include "base/timer.h"
|
||||
#include "boxes/gift_premium_box.h" // GiftPremiumValidator.
|
||||
#include "chat_helpers/compose/compose_show.h"
|
||||
#include "data/data_chat_participant_status.h"
|
||||
#include "data/data_report.h"
|
||||
#include "dialogs/dialogs_key.h"
|
||||
#include "mtproto/sender.h"
|
||||
#include "settings/settings_type.h"
|
||||
#include "window/window_adaptive.h"
|
||||
|
||||
@@ -407,11 +407,6 @@ public:
|
||||
Dialogs::RowDescriptor from = {}) const;
|
||||
|
||||
void showEditPeerBox(PeerData *peer);
|
||||
void showGiftPremiumBox(UserData *user);
|
||||
void showGiftPremiumsBox(const QString &ref);
|
||||
|
||||
// Single user gift as if was selected in multiple recipients chooser.
|
||||
void showGiftPremiumsBox(not_null<UserData*> user, const QString &ref);
|
||||
|
||||
void enableGifPauseReason(GifPauseReason reason);
|
||||
void disableGifPauseReason(GifPauseReason reason);
|
||||
@@ -735,8 +730,6 @@ private:
|
||||
|
||||
base::has_weak_ptr _storyOpenGuard;
|
||||
|
||||
GiftPremiumValidator _giftPremiumValidator;
|
||||
|
||||
QString _premiumRef;
|
||||
|
||||
rpl::lifetime _lifetime;
|
||||
|
Reference in New Issue
Block a user