mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
MTP global state moved to MTP::Instance class.
Now there will be ability to start multiple mtproto instances.
This commit is contained in:
@@ -265,7 +265,7 @@ bool Widget::resetFail(const RPCError &error) {
|
||||
void Widget::gotNearestDC(const MTPNearestDc &result) {
|
||||
auto &nearest = result.c_nearestDc();
|
||||
DEBUG_LOG(("Got nearest dc, country: %1, nearest: %2, this: %3").arg(nearest.vcountry.c_string().v.c_str()).arg(nearest.vnearest_dc.v).arg(nearest.vthis_dc.v));
|
||||
MTP::setdc(nearest.vnearest_dc.v, true);
|
||||
Messenger::Instance().mtp()->suggestMainDcId(nearest.vnearest_dc.v);
|
||||
auto nearestCountry = qs(nearest.vcountry);
|
||||
if (getData()->country != nearestCountry) {
|
||||
getData()->country = nearestCountry;
|
||||
|
Reference in New Issue
Block a user