Remove now unneeded proxies to ReactionManager.
This commit is contained in:
parent
9dcfd9d66d
commit
441482c0c4
@ -23858,7 +23858,7 @@ void MessagesManager::add_message_reaction(FullMessageId full_message_id, Reacti
|
||||
}
|
||||
|
||||
if (add_to_recent) {
|
||||
add_recent_reaction(td_, reaction_type);
|
||||
td_->reaction_manager_->add_recent_reaction(reaction_type);
|
||||
}
|
||||
|
||||
set_message_reactions(d, m, is_big, add_to_recent, std::move(promise));
|
||||
|
@ -179,15 +179,17 @@ void ReactionManager::get_emoji_reaction(const string &emoji,
|
||||
|
||||
td_api::object_ptr<td_api::availableReactions> ReactionManager::get_sorted_available_reactions(
|
||||
ChatReactions available_reactions, ChatReactions active_reactions, int32 row_size) {
|
||||
load_recent_reactions();
|
||||
load_top_reactions();
|
||||
|
||||
if (row_size < 5 || row_size > 25) {
|
||||
row_size = 8;
|
||||
}
|
||||
|
||||
bool is_premium = td_->option_manager_->get_option_boolean("is_premium");
|
||||
bool show_premium = is_premium;
|
||||
|
||||
auto recent_reactions = get_recent_reactions();
|
||||
auto top_reactions = get_top_reactions();
|
||||
const auto &recent_reactions = recent_reactions_.reaction_types_;
|
||||
auto top_reactions = top_reactions_.reaction_types_;
|
||||
LOG(INFO) << "Have available reactions " << available_reactions << " to be sorted by top reactions " << top_reactions
|
||||
<< " and recent reactions " << recent_reactions;
|
||||
if (active_reactions.allow_custom_ && active_reactions.allow_all_) {
|
||||
@ -275,16 +277,6 @@ td_api::object_ptr<td_api::availableReactions> ReactionManager::get_sorted_avail
|
||||
available_reactions.allow_custom_);
|
||||
}
|
||||
|
||||
vector<ReactionType> ReactionManager::get_recent_reactions() {
|
||||
load_recent_reactions();
|
||||
return recent_reactions_.reaction_types_;
|
||||
}
|
||||
|
||||
vector<ReactionType> ReactionManager::get_top_reactions() {
|
||||
load_top_reactions();
|
||||
return top_reactions_.reaction_types_;
|
||||
}
|
||||
|
||||
void ReactionManager::add_recent_reaction(const ReactionType &reaction_type) {
|
||||
load_recent_reactions();
|
||||
|
||||
|
@ -40,10 +40,6 @@ class ReactionManager final : public Actor {
|
||||
ChatReactions active_reactions,
|
||||
int32 row_size);
|
||||
|
||||
vector<ReactionType> get_recent_reactions();
|
||||
|
||||
vector<ReactionType> get_top_reactions();
|
||||
|
||||
void add_recent_reaction(const ReactionType &reaction_type);
|
||||
|
||||
void clear_recent_reactions(Promise<Unit> &&promise);
|
||||
|
@ -208,18 +208,6 @@ void send_set_default_reaction_query(Td *td) {
|
||||
ReactionType(td->option_manager_->get_option_string("default_reaction")));
|
||||
}
|
||||
|
||||
vector<ReactionType> get_recent_reactions(Td *td) {
|
||||
return td->reaction_manager_->get_recent_reactions();
|
||||
}
|
||||
|
||||
vector<ReactionType> get_top_reactions(Td *td) {
|
||||
return td->reaction_manager_->get_top_reactions();
|
||||
}
|
||||
|
||||
void add_recent_reaction(Td *td, const ReactionType &reaction_type) {
|
||||
td->reaction_manager_->add_recent_reaction(reaction_type);
|
||||
}
|
||||
|
||||
int64 get_reaction_types_hash(const vector<ReactionType> &reaction_types) {
|
||||
vector<uint64> numbers;
|
||||
for (auto &reaction_type : reaction_types) {
|
||||
|
@ -86,12 +86,6 @@ void set_default_reaction(Td *td, ReactionType reaction_type, Promise<Unit> &&pr
|
||||
|
||||
void send_set_default_reaction_query(Td *td);
|
||||
|
||||
vector<ReactionType> get_recent_reactions(Td *td);
|
||||
|
||||
vector<ReactionType> get_top_reactions(Td *td);
|
||||
|
||||
void add_recent_reaction(Td *td, const ReactionType &reaction_type);
|
||||
|
||||
int64 get_reaction_types_hash(const vector<ReactionType> &reaction_types);
|
||||
|
||||
} // namespace td
|
||||
|
Loading…
x
Reference in New Issue
Block a user