mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Move updates handling MainWidget -> Api::Updates.
This commit is contained in:
@@ -20,6 +20,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/image/image.h"
|
||||
#include "mainwidget.h"
|
||||
#include "observer_peer.h"
|
||||
#include "api/api_updates.h"
|
||||
#include "apiwrap.h"
|
||||
#include "main/main_app_config.h"
|
||||
#include "main/main_session.h"
|
||||
#include "facades.h"
|
||||
@@ -353,9 +355,11 @@ void Account::startMtp() {
|
||||
Global::RefConnectionTypeChanged().notify();
|
||||
}
|
||||
});
|
||||
_mtp->setSessionResetHandler([](MTP::ShiftedDcId shiftedDcId) {
|
||||
if (App::main() && shiftedDcId == MTP::maindc()) {
|
||||
App::main()->getDifference();
|
||||
_mtp->setSessionResetHandler([=](MTP::ShiftedDcId shiftedDcId) {
|
||||
if (sessionExists()) {
|
||||
if (shiftedDcId == session().api().instance()->mainDcId()) {
|
||||
session().updates().getDifference();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user