Fix build on Windows.

This commit is contained in:
John Preston 2024-08-12 10:56:34 +02:00
parent f6c071bd18
commit 155f4ea252

View file

@ -846,12 +846,11 @@ void ReceiptCreditsBox(
: toCancel : toCancel
? tr::lng_credits_subscription_on_button() ? tr::lng_credits_subscription_on_button()
: tr::lng_box_ok()); : tr::lng_box_ok());
using Flag = MTPpayments_ChangeStarsSubscription::Flag; using Flag = MTPpayments_ChangeStarsSubscription::Flag;
const auto send = [=, weak = Ui::MakeWeak(box)] { const auto send = [=, weak = Ui::MakeWeak(box)] {
if (toRenew && s.expired) { if (toRenew && s.expired) {
Api::CheckChatInvite(controller, s.inviteHash, nullptr, [=] { Api::CheckChatInvite(controller, s.inviteHash, nullptr, [=] {
if (const auto strong = weak.get()) { if (const auto strong = weak.data()) {
strong->closeBox(); strong->closeBox();
} }
}); });
@ -864,7 +863,7 @@ void ReceiptCreditsBox(
MTP_bool(toCancel) MTP_bool(toCancel)
)).done([=] { )).done([=] {
state->confirmButtonBusy = false; state->confirmButtonBusy = false;
if (const auto strong = weak.get()) { if (const auto strong = weak.data()) {
strong->closeBox(); strong->closeBox();
} }
}).fail([=, show = box->uiShow()](const MTP::Error &error) { }).fail([=, show = box->uiShow()](const MTP::Error &error) {