2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Remove some more Auth() calls.

This commit is contained in:
John Preston
2020-06-08 13:06:50 +04:00
parent bede709f6b
commit 3878a1b212
67 changed files with 380 additions and 299 deletions

View File

@@ -32,7 +32,7 @@ namespace Intro {
namespace details {
namespace {
void PrepareSupportMode() {
void PrepareSupportMode(not_null<Main::Session*> session) {
using ::Data::AutoDownload::Full;
anim::SetDisabled(true);
@@ -41,7 +41,7 @@ void PrepareSupportMode() {
Global::SetDesktopNotify(false);
Global::SetSoundNotify(false);
Global::SetFlashBounceNotify(false);
Auth().settings().autoDownload() = Full::FullDisabled();
session->settings().autoDownload() = Full::FullDisabled();
Local::writeUserSettings();
}
@@ -151,7 +151,7 @@ void Step::finish(const MTPUser &user, QImage &&photo) {
session.api().uploadPeerPhoto(session.user(), std::move(photo));
}
if (session.supportMode()) {
PrepareSupportMode();
PrepareSupportMode(&session);
}
}
}