Handle auction links.
This commit is contained in:
@@ -8,11 +8,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "window/window_session_controller.h"
|
||||
|
||||
#include "api/api_text_entities.h"
|
||||
#include "boxes/add_contact_box.h"
|
||||
#include "boxes/peers/add_bot_to_chat_box.h"
|
||||
#include "boxes/peers/edit_peer_info_box.h"
|
||||
#include "boxes/peers/replace_boost_box.h"
|
||||
#include "boxes/add_contact_box.h"
|
||||
#include "boxes/delete_messages_box.h"
|
||||
#include "boxes/star_gift_auction_box.h"
|
||||
#include "window/window_chat_preview.h"
|
||||
#include "window/window_chat_switch_process.h"
|
||||
#include "window/window_controller.h"
|
||||
@@ -3639,6 +3640,16 @@ void SessionController::dropSubsectionTabs() {
|
||||
base::take(_savedSubsectionTabs);
|
||||
}
|
||||
|
||||
void SessionController::showStarGiftAuction(const QString &slug) {
|
||||
_starGiftAuctionLifetime.destroy();
|
||||
_starGiftAuctionLifetime = Ui::ShowStarGiftAuction(
|
||||
this,
|
||||
nullptr,
|
||||
slug,
|
||||
[] {},
|
||||
[=] { _starGiftAuctionLifetime.destroy(); });
|
||||
}
|
||||
|
||||
SessionController::~SessionController() {
|
||||
resetFakeUnreadWhileOpened();
|
||||
dropSubsectionTabs();
|
||||
|
||||
@@ -696,6 +696,8 @@ public:
|
||||
-> std::unique_ptr<HistoryView::SubsectionTabs>;
|
||||
void dropSubsectionTabs();
|
||||
|
||||
void showStarGiftAuction(const QString &slug);
|
||||
|
||||
[[nodiscard]] rpl::lifetime &lifetime() {
|
||||
return _lifetime;
|
||||
}
|
||||
@@ -815,6 +817,8 @@ private:
|
||||
std::unique_ptr<HistoryView::SubsectionTabs> _savedSubsectionTabs;
|
||||
rpl::lifetime _savedSubsectionTabsLifetime;
|
||||
|
||||
rpl::lifetime _starGiftAuctionLifetime;
|
||||
|
||||
rpl::lifetime _lifetime;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user