From 7dc2d13afef5fa4d33152c4f70ca154c8d89f379 Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 29 May 2020 06:57:55 +0300 Subject: [PATCH] Make set_dialog_is_pinned private. GitOrigin-RevId: 3ef6116d16897b28997e7fa91c1d496fce4edee2 --- td/telegram/MessagesManager.cpp | 3 ++- td/telegram/MessagesManager.h | 4 ++-- td/telegram/Td.cpp | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index f0ac806a2..5a464bb63 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -1158,7 +1158,8 @@ class ToggleDialogPinQuery : public Td::ResultHandler { if (!td->messages_manager_->on_get_dialog_error(dialog_id_, status, "ToggleDialogPinQuery")) { LOG(ERROR) << "Receive error for ToggleDialogPinQuery: " << status; } - td->messages_manager_->set_dialog_is_pinned(dialog_id_, !is_pinned_); + td->messages_manager_->on_update_pinned_dialogs(FolderId::main()); + td->messages_manager_->on_update_pinned_dialogs(FolderId::archive()); promise_.set_error(std::move(status)); } }; diff --git a/td/telegram/MessagesManager.h b/td/telegram/MessagesManager.h index 58218d42f..7fc0f4989 100644 --- a/td/telegram/MessagesManager.h +++ b/td/telegram/MessagesManager.h @@ -572,8 +572,6 @@ class MessagesManager : public Actor { void clear_all_draft_messages(bool exclude_secret_chats, Promise &&promise); - void set_dialog_is_pinned(DialogId dialog_id, bool is_pinned); - Status toggle_dialog_is_pinned(DialogListId dialog_list_id, DialogId dialog_id, bool is_pinned) TD_WARN_UNUSED_RESULT; Status toggle_dialog_is_marked_as_unread(DialogId dialog_id, bool is_marked_as_unread) TD_WARN_UNUSED_RESULT; @@ -2121,6 +2119,8 @@ class MessagesManager : public Actor { static vector remove_secret_chat_dialog_ids(vector dialog_ids); + void set_dialog_is_pinned(DialogId dialog_id, bool is_pinned); + bool set_dialog_is_pinned(DialogListId dialog_list_id, Dialog *d, bool is_pinned, bool need_update_dialog_lists = true); diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index ccb6cfb72..df22f830c 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -3167,6 +3167,7 @@ void Td::on_get_promo_data(Result &&object) { case td_api::updateChatOnlineMemberCount::ID / 2: case td_api::updateUserChatAction::ID / 2: case td_api::updateChatFilters::ID / 2: + case td_api::updateChatPosition::ID / 2: LOG(ERROR) << "Sending update: " << oneline(to_string(object)); break; default: