From 65b5a2928876c34bb395e0567715793c602741f8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 2 Oct 2019 11:09:45 +0300 Subject: [PATCH] Fix local url handling. Regression was introduced in 849deb57e2. Fixes #6622. --- Telegram/SourceFiles/core/core_ui_integration.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/core/core_ui_integration.cpp b/Telegram/SourceFiles/core/core_ui_integration.cpp index a05808707..a8011bd4a 100644 --- a/Telegram/SourceFiles/core/core_ui_integration.cpp +++ b/Telegram/SourceFiles/core/core_ui_integration.cpp @@ -47,7 +47,7 @@ void UiIntegration::textActionsUpdated() { window->updateGlobalMenu(); } } - + void UiIntegration::activationFromTopPanel() { Platform::IgnoreApplicationActivationRightNow(); } @@ -115,7 +115,7 @@ std::shared_ptr UiIntegration::createLinkHandler( bool UiIntegration::handleUrlClick( const QString &url, const QVariant &context) { - auto local = Core::TryConvertUrlToLocal(url); + const auto local = Core::TryConvertUrlToLocal(url); if (Core::InternalPassportLink(local)) { return true; } @@ -123,8 +123,8 @@ bool UiIntegration::handleUrlClick( if (UrlClickHandler::IsEmail(url)) { File::OpenEmailLink(url); return true; - } else if (url.startsWith(qstr("tg://"), Qt::CaseInsensitive)) { - Core::App().openLocalUrl(url, context); + } else if (local.startsWith(qstr("tg://"), Qt::CaseInsensitive)) { + Core::App().openLocalUrl(local, context); return true; } return false;