Fix language switch when getting difference.

This commit is contained in:
John Preston 2017-07-26 15:50:39 +03:00
parent 216692cd9b
commit 647d6ae443

View file

@ -38,7 +38,8 @@ CloudManager::CloudManager(Instance &langpack, gsl::not_null<MTP::Instance*> mtp
} }
void CloudManager::requestLangPackDifference() { void CloudManager::requestLangPackDifference() {
if (_langpack.isCustom() || _langPackRequestId) { request(_langPackRequestId).cancel();
if (_langpack.isCustom()) {
return; return;
} }
@ -171,7 +172,6 @@ bool CloudManager::showOfferSwitchBox() {
if (_offerSwitchToId.isEmpty()) { if (_offerSwitchToId.isEmpty()) {
return; return;
} }
request(_langPackRequestId).cancel();
performSwitchAndRestart(_offerSwitchToId); performSwitchAndRestart(_offerSwitchToId);
}, [this] { }, [this] {
Ui::hideLayer(); Ui::hideLayer();