tg_cli: keep client settings after reset.
GitOrigin-RevId: c3bd45d9369250f9eb867e9500d6854d0dda19a9
This commit is contained in:
parent
62d7423bc3
commit
00ff276a1f
@ -854,6 +854,13 @@ class CliClient final : public Actor {
|
|||||||
options.net_query_stats = net_query_stats_;
|
options.net_query_stats = net_query_stats_;
|
||||||
|
|
||||||
td_client_ = create_actor<ClientActor>(name, make_unique<TdCallbackImpl>(this, ++generation_), std::move(options));
|
td_client_ = create_actor<ClientActor>(name, make_unique<TdCallbackImpl>(this, ++generation_), std::move(options));
|
||||||
|
|
||||||
|
if (get_chat_list_) {
|
||||||
|
send_request(td_api::make_object<td_api::getChats>(nullptr, std::numeric_limits<int64>::max(), 0, 100));
|
||||||
|
}
|
||||||
|
if (disable_network_) {
|
||||||
|
send_request(td_api::make_object<td_api::setNetworkType>(td_api::make_object<td_api::networkTypeNone>()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_td() {
|
void init_td() {
|
||||||
@ -923,13 +930,6 @@ class CliClient final : public Actor {
|
|||||||
reactivate_readline();
|
reactivate_readline();
|
||||||
#endif
|
#endif
|
||||||
Scheduler::subscribe(stdin_.get_poll_info().extract_pollable_fd(this), PollFlags::Read());
|
Scheduler::subscribe(stdin_.get_poll_info().extract_pollable_fd(this), PollFlags::Read());
|
||||||
|
|
||||||
if (get_chat_list_) {
|
|
||||||
send_request(td_api::make_object<td_api::getChats>(nullptr, std::numeric_limits<int64>::max(), 0, 100));
|
|
||||||
}
|
|
||||||
if (disable_network_) {
|
|
||||||
send_request(td_api::make_object<td_api::setNetworkType>(td_api::make_object<td_api::networkTypeNone>()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#ifndef USE_READLINE
|
#ifndef USE_READLINE
|
||||||
size_t buffer_pos_ = 0;
|
size_t buffer_pos_ = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user