2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Remove Session::Exists() global access point.

This commit is contained in:
John Preston
2020-06-10 17:24:41 +04:00
parent 5f8d22f1f2
commit 598fb67cdf
19 changed files with 119 additions and 133 deletions

View File

@@ -249,7 +249,7 @@ void CloudManager::setSuggestedLanguage(const QString &langCode) {
_languageWasSuggested = true;
_firstLanguageSuggestion.notify();
if (Main::Session::Exists()
if (Core::App().offerLegacyLangPackSwitch()
&& _langpack.id().isEmpty()
&& !_suggestedLanguage.isEmpty()) {
_offerSwitchToId = _suggestedLanguage;
@@ -386,9 +386,7 @@ bool CloudManager::canApplyWithoutRestart(const QString &id) const {
if (id == qstr("#TEST_X") || id == qstr("#TEST_0")) {
return true;
}
// We don't support instant language switch if the auth session exists :(
return !Main::Session::Exists();
return Core::App().canApplyLangPackWithoutRestart();
}
void CloudManager::resetToDefault() {