mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Remove Auth() global access point.
This commit is contained in:
@@ -114,25 +114,27 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
}, _lifetime);
|
||||
|
||||
activeAccount().sessionChanges(
|
||||
) | rpl::start_with_next([=] {
|
||||
) | rpl::start_with_next([=](Main::Session *session) {
|
||||
if (_mediaView) {
|
||||
hideMediaView();
|
||||
_mediaView->clearData();
|
||||
}
|
||||
if (session && !UpdaterDisabled()) {
|
||||
if (const auto mtp = activeAccount().mtp()) {
|
||||
UpdateChecker().setMtproto(mtp, session->userId());
|
||||
}
|
||||
}
|
||||
}, _lifetime);
|
||||
|
||||
activeAccount().mtpChanges(
|
||||
) | rpl::filter([=](MTP::Instance *instance) {
|
||||
return instance != nullptr;
|
||||
}) | rpl::start_with_next([=](not_null<MTP::Instance*> mtp) {
|
||||
}) | rpl::start_with_next([=] {
|
||||
if (_window) {
|
||||
// This should be called when user settings are read.
|
||||
// Right now after they are read the startMtp() is called.
|
||||
_window->widget()->updateTrayMenu();
|
||||
}
|
||||
if (!UpdaterDisabled()) {
|
||||
UpdateChecker().setMtproto(mtp.get());
|
||||
}
|
||||
}, _lifetime);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user