Fix local url handling.

Regression was introduced in 849deb57e2.

Fixes #6622.
This commit is contained in:
John Preston 2019-10-02 11:09:45 +03:00
parent bf345da87b
commit 65b5a29288
1 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ std::shared_ptr<ClickHandler> UiIntegration::createLinkHandler(
bool UiIntegration::handleUrlClick( bool UiIntegration::handleUrlClick(
const QString &url, const QString &url,
const QVariant &context) { const QVariant &context) {
auto local = Core::TryConvertUrlToLocal(url); const auto local = Core::TryConvertUrlToLocal(url);
if (Core::InternalPassportLink(local)) { if (Core::InternalPassportLink(local)) {
return true; return true;
} }
@ -123,8 +123,8 @@ bool UiIntegration::handleUrlClick(
if (UrlClickHandler::IsEmail(url)) { if (UrlClickHandler::IsEmail(url)) {
File::OpenEmailLink(url); File::OpenEmailLink(url);
return true; return true;
} else if (url.startsWith(qstr("tg://"), Qt::CaseInsensitive)) { } else if (local.startsWith(qstr("tg://"), Qt::CaseInsensitive)) {
Core::App().openLocalUrl(url, context); Core::App().openLocalUrl(local, context);
return true; return true;
} }
return false; return false;