mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Remove Session::Exists() global access point.
This commit is contained in:
@@ -120,9 +120,7 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
_mediaView->clearData();
|
||||
}
|
||||
if (session && !UpdaterDisabled()) {
|
||||
if (const auto mtp = activeAccount().mtp()) {
|
||||
UpdateChecker().setMtproto(mtp, session->userId());
|
||||
}
|
||||
UpdateChecker().setMtproto(session);
|
||||
}
|
||||
}, _lifetime);
|
||||
|
||||
@@ -580,6 +578,16 @@ bool Application::unreadBadgeMuted() const {
|
||||
: false;
|
||||
}
|
||||
|
||||
bool Application::offerLangPackSwitch() const {
|
||||
// #TODO multi we offer only if we were upgraded from an old authed app.
|
||||
return activeAccount().sessionExists();
|
||||
}
|
||||
|
||||
bool Application::canApplyLangPackWithoutRestart() const {
|
||||
// #TODO multi we can't if at least one account is authorized.
|
||||
return !activeAccount().sessionExists();
|
||||
}
|
||||
|
||||
void Application::setInternalLinkDomain(const QString &domain) const {
|
||||
// This domain should start with 'http[s]://' and end with '/'.
|
||||
// Like 'https://telegram.me/' or 'https://t.me/'.
|
||||
|
Reference in New Issue
Block a user