mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Added ability to cancel and renew subscription from settings section.
This commit is contained in:
@@ -342,7 +342,8 @@ void ConfirmSubscriptionBox(
|
||||
void CheckChatInvite(
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QString &hash,
|
||||
ChannelData *invitePeekChannel) {
|
||||
ChannelData *invitePeekChannel,
|
||||
Fn<void()> loaded) {
|
||||
const auto session = &controller->session();
|
||||
const auto weak = base::make_weak(controller);
|
||||
session->api().checkChatInvite(hash, [=](const MTPChatInvite &result) {
|
||||
@@ -350,6 +351,9 @@ void CheckChatInvite(
|
||||
if (!strong) {
|
||||
return;
|
||||
}
|
||||
if (loaded) {
|
||||
loaded();
|
||||
}
|
||||
Core::App().hideMediaView();
|
||||
const auto show = [&](not_null<PeerData*> chat) {
|
||||
const auto way = Window::SectionShow::Way::Forward;
|
||||
|
@@ -38,7 +38,8 @@ namespace Api {
|
||||
void CheckChatInvite(
|
||||
not_null<Window::SessionController*> controller,
|
||||
const QString &hash,
|
||||
ChannelData *invitePeekChannel = nullptr);
|
||||
ChannelData *invitePeekChannel = nullptr,
|
||||
Fn<void()> loaded = nullptr);
|
||||
|
||||
} // namespace Api
|
||||
|
||||
|
Reference in New Issue
Block a user