Add suggested_language_code option.
GitOrigin-RevId: 67472e28774cb506f11687d0ac86b24cb707dfc9
This commit is contained in:
parent
9575ed5fbd
commit
296950f1cf
@ -792,6 +792,13 @@ void ConfigManager::process_config(tl_object_ptr<telegram_api::config> config) {
|
||||
} else {
|
||||
G()->shared_config().set_option_empty("session_count");
|
||||
}
|
||||
if ((config->flags_ & telegram_api::config::SUGGESTED_LANG_CODE_MASK) != 0) {
|
||||
G()->shared_config().set_option_string("suggested_language_code", config->suggested_lang_code_);
|
||||
G()->shared_config().set_option_integer("language_pack_version", config->lang_pack_version_);
|
||||
} else {
|
||||
G()->shared_config().set_option_empty("suggested_language_code");
|
||||
G()->shared_config().set_option_empty("language_pack_version");
|
||||
}
|
||||
}
|
||||
|
||||
if (is_from_main_dc) {
|
||||
|
@ -3447,7 +3447,7 @@ bool Td::is_internal_config_option(Slice name) {
|
||||
name == "edit_time_limit" || name == "revoke_pm_inbox" || name == "revoke_time_limit" ||
|
||||
name == "revoke_pm_time_limit" || name == "rating_e_decay" || name == "saved_animations_limit" ||
|
||||
name == "recent_stickers_limit" || name == "expect_blocking" || name == "dc_txt_domain_name" ||
|
||||
name == "my_phone_number" || name == "webfile_dc_id" || name == "auth";
|
||||
name == "my_phone_number" || name == "webfile_dc_id" || name == "language_pack_version" || name == "auth";
|
||||
}
|
||||
|
||||
void Td::on_config_option_updated(const string &name) {
|
||||
@ -3487,6 +3487,9 @@ void Td::on_config_option_updated(const string &name) {
|
||||
if (G()->mtproto_header().set_language_code(G()->shared_config().get_option_string(name))) {
|
||||
G()->net_query_dispatcher().update_mtproto_header();
|
||||
}
|
||||
} else if (name == "language_pack_version") {
|
||||
// TODO update language_pack
|
||||
return;
|
||||
} else if (is_internal_config_option(name)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user