2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 16:35:44 +00:00

Slightly improved invoice view in messages for credits.

This commit is contained in:
23rd
2024-05-22 21:48:57 +03:00
committed by John Preston
parent 3d81414c71
commit 84cde1354d
2 changed files with 17 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "apiwrap.h"
#include "api/api_cloud_password.h"
#include "api/api_send_progress.h"
#include "boxes/send_credits_box.h"
#include "boxes/share_box.h"
#include "boxes/passcode_box.h"
#include "boxes/url_auth_box.h"
@@ -330,12 +331,16 @@ void ActivateBotCommand(ClickHandlerContext context, int row, int column) {
} break;
case ButtonType::Buy: {
Payments::CheckoutProcess::Start(
item,
Payments::Mode::Payment,
crl::guard(controller, [=](auto) {
controller->widget()->activate();
}));
if (Ui::IsCreditsInvoice(item)) {
controller->uiShow()->show(Box(Ui::SendCreditsBox, item));
} else {
Payments::CheckoutProcess::Start(
item,
Payments::Mode::Payment,
crl::guard(controller, [=](auto) {
controller->widget()->activate();
}));
}
} break;
case ButtonType::Url: {