mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Added extracting of session controller from context for custom urls.
This commit is contained in:
parent
add6352012
commit
06d5d8859a
1 changed files with 5 additions and 1 deletions
|
@ -46,6 +46,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "lang/lang_instance.h"
|
||||
#include "mainwidget.h"
|
||||
#include "core/file_utilities.h"
|
||||
#include "core/click_handler_types.h" // ClickHandlerContext.
|
||||
#include "core/crash_reports.h"
|
||||
#include "main/main_account.h"
|
||||
#include "main/main_domain.h"
|
||||
|
@ -892,7 +893,10 @@ bool Application::openCustomUrl(
|
|||
return false;
|
||||
}
|
||||
const auto command = base::StringViewMid(urlTrimmed, protocol.size(), 8192);
|
||||
const auto controller = _primaryWindow
|
||||
const auto my = context.value<ClickHandlerContext>();
|
||||
const auto controller = my.sessionWindow.get()
|
||||
? my.sessionWindow.get()
|
||||
: _primaryWindow
|
||||
? _primaryWindow->sessionController()
|
||||
: nullptr;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue