Don't send fake optionValueEmpty while logging out.
This commit is contained in:
parent
c91e8d6ce2
commit
b83c04be60
@ -229,16 +229,6 @@ void OptionManager::on_update_server_time_difference() {
|
||||
send_unix_time_update();
|
||||
}
|
||||
|
||||
void OptionManager::clear_options() {
|
||||
for (const auto &option : options_->get_all()) {
|
||||
if (!is_internal_option(option.first)) {
|
||||
send_closure(
|
||||
G()->td(), &Td::send_update,
|
||||
td_api::make_object<td_api::updateOption>(option.first, td_api::make_object<td_api::optionValueEmpty>()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool OptionManager::is_internal_option(Slice name) {
|
||||
switch (name[0]) {
|
||||
case 'a':
|
||||
|
@ -55,8 +55,6 @@ class OptionManager {
|
||||
|
||||
void set_option(const string &name, td_api::object_ptr<td_api::OptionValue> &&value, Promise<Unit> &&promise);
|
||||
|
||||
void clear_options();
|
||||
|
||||
static bool is_synchronous_option(Slice name);
|
||||
|
||||
static td_api::object_ptr<td_api::OptionValue> get_option_synchronously(Slice name);
|
||||
|
@ -3343,13 +3343,10 @@ void Td::clear() {
|
||||
close_flag_ = 2;
|
||||
|
||||
Timer timer;
|
||||
if (destroy_flag_) {
|
||||
option_manager_->clear_options();
|
||||
if (!auth_manager_->is_bot()) {
|
||||
if (!auth_manager_->is_bot()) {
|
||||
if (destroy_flag_) {
|
||||
notification_manager_->destroy_all_notifications();
|
||||
}
|
||||
} else {
|
||||
if (!auth_manager_->is_bot()) {
|
||||
} else {
|
||||
notification_manager_->flush_all_notifications();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user