2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Have a global Core::Launcher accessor

This allows to use Launcher in code executing before Sandbox is created
This commit is contained in:
Ilya Fedin
2023-06-13 04:34:27 +04:00
committed by John Preston
parent 63ccf1bed4
commit a7bd097b2f
13 changed files with 50 additions and 70 deletions

View File

@@ -28,7 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "window/window_session_controller.h"
#include "storage/storage_media_prepare.h"
#include "storage/localimageloader.h"
#include "core/sandbox.h"
#include "core/launcher.h"
#include "core/application.h"
#include "core/core_settings.h"
#include "main/main_session.h"
@@ -138,7 +138,7 @@ void EditInfoBox::setInnerFocus() {
}
uint32 OccupationTag() {
return uint32(Core::Sandbox::Instance().installationTag() & 0xFFFFFFFF);
return uint32(Core::Launcher::Instance().installationTag() & 0xFFFFFFFF);
}
QString NormalizeName(QString name) {
@@ -268,7 +268,7 @@ Helper::Helper(not_null<Main::Session*> session)
}).fail([=] {
setSupportName(
u"[rand^"_q
+ QString::number(Core::Sandbox::Instance().installationTag())
+ QString::number(Core::Launcher::Instance().installationTag())
+ ']');
}).send();
}