Remove chat.chat_list.

GitOrigin-RevId: 24149fa780522d30546e8fb820441ee58046a6c5
This commit is contained in:
levlam 2020-05-09 02:15:40 +03:00
parent 0613614651
commit 3c93bf8da2
4 changed files with 2 additions and 30 deletions

View File

@ -678,7 +678,6 @@ chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPo
//@description A chat. (Can be a private chat, basic group, supergroup, or secret chat)
//@id Chat unique identifier
//@type Type of the chat
//@chat_list A chat list to which the chat belongs; may be null
//@title Chat title
//@photo Chat photo; may be null
//@permissions Actions that non-administrator chat members are allowed to take in the chat
@ -700,7 +699,7 @@ chatPosition list:ChatList order:int64 is_pinned:Bool source:ChatSource = ChatPo
//@reply_markup_message_id Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
//@draft_message A draft of a message in the chat; may be null
//@client_data Contains client-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
chat id:int53 type:ChatType chat_list:ChatList title:string photo:chatPhoto permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
chat id:int53 type:ChatType title:string photo:chatPhoto permissions:chatPermissions last_message:message positions:vector<chatPosition> is_marked_as_unread:Bool has_scheduled_messages:Bool can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_reported:Bool default_disable_notification:Bool unread_count:int32 last_read_inbox_message_id:int53 last_read_outbox_message_id:int53 unread_mention_count:int32 notification_settings:chatNotificationSettings action_bar:ChatActionBar pinned_message_id:int53 reply_markup_message_id:int53 draft_message:draftMessage client_data:string = Chat;
//@description Represents a list of chats @chat_ids List of chat identifiers
chats chat_ids:vector<int53> = Chats;
@ -2885,9 +2884,6 @@ updateMessageLiveLocationViewed chat_id:int53 message_id:int53 = Update;
//@description A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates @chat The chat
updateNewChat chat:chat = Update;
//@description The list to which the chat belongs was changed @chat_id Chat identifier @chat_list The new chat's chat list; may be null
updateChatChatList chat_id:int53 chat_list:ChatList = Update;
//@description The title of a chat was changed @chat_id Chat identifier @title The new chat title
updateChatTitle chat_id:int53 title:string = Update;

Binary file not shown.

View File

@ -15793,7 +15793,7 @@ td_api::object_ptr<td_api::chat> MessagesManager::get_chat_object(const Dialog *
auto draft_message = can_send_message(d->dialog_id).is_ok() ? get_draft_message_object(d->draft_message) : nullptr;
return make_tl_object<td_api::chat>(
d->dialog_id.get(), get_chat_type_object(d->dialog_id), get_chat_list_object(d), get_dialog_title(d->dialog_id),
d->dialog_id.get(), get_chat_type_object(d->dialog_id), get_dialog_title(d->dialog_id),
get_chat_photo_object(td_->file_manager_.get(), get_dialog_photo(d->dialog_id)),
get_dialog_permissions(d->dialog_id).get_chat_permissions_object(),
get_message_object(d->dialog_id, get_message(d, d->last_message_id)), get_chat_positions_object(d),
@ -23287,16 +23287,6 @@ void MessagesManager::send_update_chat_online_member_count(DialogId dialog_id, i
make_tl_object<td_api::updateChatOnlineMemberCount>(dialog_id.get(), online_member_count));
}
void MessagesManager::send_update_chat_chat_list(const Dialog *d) const {
if (td_->auth_manager_->is_bot()) {
return;
}
LOG_CHECK(d->is_update_new_chat_sent) << "Wrong " << d->dialog_id << " in send_update_chat_chat_list";
send_closure(G()->td(), &Td::send_update,
make_tl_object<td_api::updateChatChatList>(d->dialog_id.get(), get_chat_list_object(d)));
}
void MessagesManager::send_update_secret_chats_with_user_action_bar(const Dialog *d) const {
if (td_->auth_manager_->is_bot()) {
return;
@ -28909,7 +28899,6 @@ bool MessagesManager::set_dialog_order(Dialog *d, int64 new_order, bool need_sen
d->folder_id = FolderId::main();
d->is_folder_id_inited = true;
send_update_chat_chat_list(d);
on_dialog_updated(d->dialog_id, "set_dialog_order 5");
if (is_dialog_sponsored(d)) {
@ -28920,9 +28909,6 @@ bool MessagesManager::set_dialog_order(Dialog *d, int64 new_order, bool need_sen
}
}
if (is_added_to_folder && !(dialog_id == sponsored_dialog_id_ && d->folder_id == FolderId::main())) {
send_update_chat_chat_list(d);
}
if (was_sponsored != is_dialog_sponsored(d)) {
send_update_chat_position(FolderId::main(), d);
if (!is_loaded_from_database && !was_sponsored) {
@ -28935,9 +28921,6 @@ bool MessagesManager::set_dialog_order(Dialog *d, int64 new_order, bool need_sen
if (old_public_order != new_public_order && need_send_update_chat_order) {
send_update_chat_position(d->folder_id, d);
}
if (is_removed_from_folder && !(dialog_id == sponsored_dialog_id_ && d->folder_id == FolderId::main())) {
send_update_chat_chat_list(d);
}
return true;
}
@ -30971,10 +30954,6 @@ void MessagesManager::add_sponsored_dialog(const Dialog *d, DialogSource source)
sponsored_dialog_id_ = d->dialog_id;
sponsored_dialog_source_ = std::move(source);
if (is_dialog_sponsored(d)) {
send_update_chat_chat_list(d);
}
// update last_server_dialog_date in any case, because all chats before SPONSORED_DIALOG_ORDER are known
auto dialog_list_id = FolderId::main();
auto &list = get_dialog_list(dialog_list_id);
@ -31034,7 +31013,6 @@ void MessagesManager::set_sponsored_dialog(DialogId dialog_id, DialogSource sour
sponsored_dialog_id_ = DialogId();
sponsored_dialog_source_ = DialogSource();
if (is_sponsored) {
send_update_chat_chat_list(d);
send_update_chat_position(FolderId::main(), d);
need_update_total_chat_count = true;
}

View File

@ -1980,8 +1980,6 @@ class MessagesManager : public Actor {
void send_update_chat_online_member_count(DialogId dialog_id, int32 online_member_count) const;
void send_update_chat_chat_list(const Dialog *d) const;
void send_update_secret_chats_with_user_action_bar(const Dialog *d) const;
void send_update_chat_action_bar(const Dialog *d);