From aa6029f63cdbe6d7cb659b379266ee563baad603 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 23 Apr 2020 17:30:48 +0300 Subject: [PATCH] Remove "disabled_" options clean up. GitOrigin-RevId: 67e05fa327e327f9182051099aff23f246f1c6c5 --- td/telegram/ConfigManager.cpp | 6 ------ td/telegram/ConfigShared.cpp | 4 ---- td/telegram/ConfigShared.h | 1 - 3 files changed, 11 deletions(-) diff --git a/td/telegram/ConfigManager.cpp b/td/telegram/ConfigManager.cpp index 4f420910..a1dddae6 100644 --- a/td/telegram/ConfigManager.cpp +++ b/td/telegram/ConfigManager.cpp @@ -1262,12 +1262,6 @@ void ConfigManager::process_config(tl_object_ptr config) { shared_config.set_option_empty("notify_default_delay_ms"); shared_config.set_option_empty("large_chat_size"); - if (is_from_main_dc) { - for (auto &feature : shared_config.get_options("disabled_")) { - shared_config.set_option_empty(feature.first); - } - } - // TODO implement online status updates // shared_config.set_option_integer("offline_blur_timeout_ms", config->offline_blur_timeout_ms_); // shared_config.set_option_integer("offline_idle_timeout_ms", config->offline_idle_timeout_ms_); diff --git a/td/telegram/ConfigShared.cpp b/td/telegram/ConfigShared.cpp index ead1572c..4dc01392 100644 --- a/td/telegram/ConfigShared.cpp +++ b/td/telegram/ConfigShared.cpp @@ -59,10 +59,6 @@ string ConfigShared::get_option(Slice name) const { return config_pmc_->get(name.str()); } -std::unordered_map ConfigShared::get_options(Slice prefix) const { - return config_pmc_->prefix_get(prefix); -} - std::unordered_map ConfigShared::get_options() const { return config_pmc_->get_all(); } diff --git a/td/telegram/ConfigShared.h b/td/telegram/ConfigShared.h index 9628bec6..1f507086 100644 --- a/td/telegram/ConfigShared.h +++ b/td/telegram/ConfigShared.h @@ -41,7 +41,6 @@ class ConfigShared { void set_option_string(Slice name, Slice value); bool have_option(Slice name) const; - std::unordered_map get_options(Slice prefix) const; std::unordered_map get_options() const; bool get_option_boolean(Slice name, bool default_value = false) const;