2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Allow HiddenUrlClickHandler to work in a payment form.

This commit is contained in:
John Preston
2022-06-20 17:14:14 +04:00
parent 7027c0db0b
commit 66e9c5ef16
8 changed files with 45 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/local_url_handlers.h" // TryConvertUrlToLocal.
#include "core/file_utilities.h" // File::OpenUrl.
#include "core/core_cloud_password.h" // Core::CloudPasswordState
#include "core/click_handler_types.h"
#include "lang/lang_keys.h"
#include "apiwrap.h"
#include "api/api_cloud_password.h"
@@ -808,6 +809,12 @@ void CheckoutProcess::panelShowBox(object_ptr<Ui::BoxContent> box) {
_panel->showBox(std::move(box));
}
QVariant CheckoutProcess::panelClickHandlerContext() {
return QVariant::fromValue(ClickHandlerContext{
.show = _panel->uiShow(),
});
}
void CheckoutProcess::performInitialSilentValidation() {
const auto &invoice = _form->invoice();
const auto &saved = _form->information();