Hide all business bot manage bars when changing business bot.
This commit is contained in:
parent
7aad37608f
commit
69fd5333d7
@ -102,6 +102,7 @@ class UpdateConnectedBotQuery final : public Td::ResultHandler {
|
||||
|
||||
auto ptr = result_ptr.move_as_ok();
|
||||
LOG(INFO) << "Receive result for UpdateConnectedBotQuery: " << to_string(ptr);
|
||||
td_->messages_manager_->hide_all_business_bot_manager_bars();
|
||||
td_->updates_manager_->on_get_updates(std::move(ptr), std::move(promise_));
|
||||
}
|
||||
|
||||
|
@ -7859,6 +7859,16 @@ void MessagesManager::remove_dialog_action_bar(DialogId dialog_id, Promise<Unit>
|
||||
toggle_dialog_report_spam_state_on_server(dialog_id, false, 0, std::move(promise));
|
||||
}
|
||||
|
||||
void MessagesManager::hide_all_business_bot_manager_bars() {
|
||||
dialogs_.foreach([&](const DialogId &dialog_id, unique_ptr<Dialog> &dialog) {
|
||||
Dialog *d = dialog.get();
|
||||
if (d->business_bot_manage_bar != nullptr) {
|
||||
d->business_bot_manage_bar = nullptr;
|
||||
send_update_chat_business_bot_manage_bar(d);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void MessagesManager::repair_dialog_active_group_call_id(DialogId dialog_id) {
|
||||
if (td_->dialog_manager_->have_input_peer(dialog_id, AccessRights::Read)) {
|
||||
LOG(INFO) << "Repair active voice chat ID in " << dialog_id;
|
||||
|
@ -850,6 +850,8 @@ class MessagesManager final : public Actor {
|
||||
|
||||
void reget_dialog_action_bar(DialogId dialog_id, const char *source, bool is_repair = true);
|
||||
|
||||
void hide_all_business_bot_manager_bars();
|
||||
|
||||
void on_get_peer_settings(DialogId dialog_id, tl_object_ptr<telegram_api::peerSettings> &&peer_settings,
|
||||
bool ignore_privacy_exception = false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user