Fix using of base langpack for custom languages.

This commit is contained in:
John Preston 2018-12-11 16:00:24 +04:00
parent ffd6f7b326
commit cf227490d7
2 changed files with 3 additions and 2 deletions

View File

@ -221,7 +221,6 @@ mtpRequestId CloudManager::packRequestId(Pack pack) const {
}
void CloudManager::requestLangPackDifference(Pack pack) {
const auto base = (pack == Pack::Base);
request(base::take(packRequestId(pack))).cancel();
if (_langpack.isCustom()) {
return;

View File

@ -268,7 +268,7 @@ void Instance::setBaseId(const QString &baseId, const QString &pluralId) {
if (!_base) {
_base = std::make_unique<Instance>(this, PrivateTag{});
}
_base->switchToId({ baseId, _pluralId });
_base->switchToId({ baseId, pluralId });
}
}
@ -513,6 +513,8 @@ void Instance::fillFromSerialized(
"Could not read data from serialized langpack."));
return;
}
} else {
stream >> base;
}
if (!base.isEmpty()) {
_base = std::make_unique<Instance>(this, PrivateTag{});