Use navigation cancel in Webview.

This commit is contained in:
John Preston 2021-03-02 21:54:25 +04:00
parent c74e240d30
commit 25bbde2739
2 changed files with 6 additions and 4 deletions

View File

@ -152,10 +152,12 @@ void GetPaymentForm(not_null<const HistoryItem*> msg) {
});
webview->setNavigationHandler([=](const QString &uri) {
if (Core::TryConvertUrlToLocal(uri) != uri) {
window->deleteLater();
App::wnd()->activate();
if (Core::TryConvertUrlToLocal(uri) == uri) {
return true;
}
window->deleteLater();
App::wnd()->activate();
return false;
});
webview->init(R"(

@ -1 +1 @@
Subproject commit 3f004da92dd1368d8bad4bc3838941fef10af76d
Subproject commit 7491d160231a18dec6aec1f3c1e1575382d10745