diff --git a/Telegram/SourceFiles/history/history_item.h b/Telegram/SourceFiles/history/history_item.h index 0f53f8e85..89ece7de5 100644 --- a/Telegram/SourceFiles/history/history_item.h +++ b/Telegram/SourceFiles/history/history_item.h @@ -46,6 +46,10 @@ class Media; class MessageReactions; } // namespace Data +namespace Main { +class Session; +} // namespace Main + namespace Window { class SessionController; } // namespace Window diff --git a/Telegram/SourceFiles/payments/payments_form.cpp b/Telegram/SourceFiles/payments/payments_form.cpp index 9ca0f9682..8dd8b2d42 100644 --- a/Telegram/SourceFiles/payments/payments_form.cpp +++ b/Telegram/SourceFiles/payments/payments_form.cpp @@ -319,10 +319,12 @@ void Form::processForm(const MTPDpayments_paymentForm &data) { if (const auto credentials = data.vsaved_credentials()) { _paymentMethod.savedCredentials.reserve(credentials->v.size()); for (const auto &saved : credentials->v) { - saved.match([&](const auto &data) { - addSavedCredentials(data); + _paymentMethod.savedCredentials.push_back({ + .id = qs(saved.data().vid()), + .title = qs(saved.data().vtitle()), }); } + refreshPaymentMethodDetails(); } if (const auto additional = data.vadditional_methods()) { processAdditionalPaymentMethods(additional->v); @@ -473,15 +475,6 @@ void Form::processSavedInformation(const MTPDpaymentRequestedInfo &data) { }; } -void Form::addSavedCredentials( - const MTPDpaymentSavedCredentialsCard &data) { - _paymentMethod.savedCredentials.push_back({ - .id = qs(data.vid()), - .title = qs(data.vtitle()), - }); - refreshPaymentMethodDetails(); -} - void Form::processAdditionalPaymentMethods( const QVector &list) { _paymentMethod.ui.additionalMethods = ranges::views::all( diff --git a/Telegram/SourceFiles/payments/payments_form.h b/Telegram/SourceFiles/payments/payments_form.h index 1811dc8e2..4290edee4 100644 --- a/Telegram/SourceFiles/payments/payments_form.h +++ b/Telegram/SourceFiles/payments/payments_form.h @@ -256,8 +256,6 @@ private: void processDetails(const MTPDpayments_paymentForm &data); void processDetails(const MTPDpayments_paymentReceipt &data); void processSavedInformation(const MTPDpaymentRequestedInfo &data); - void addSavedCredentials( - const MTPDpaymentSavedCredentialsCard &data); void processAdditionalPaymentMethods( const QVector &list); void processShippingOptions(const QVector &data);