Improve name of update_story_list_sent_total_count function.

This commit is contained in:
levlam 2023-07-13 15:34:53 +03:00
parent 6b4586da9b
commit 39eb3fdb0d
2 changed files with 7 additions and 7 deletions

View File

@ -1262,7 +1262,7 @@ void StoryManager::on_load_active_stories(
on_update_active_stories(dialog_id, StoryId(), vector<StoryId>());
load_dialog_expiring_stories(dialog_id, 0, "on_load_active_stories 1");
}
update_sent_total_count(is_hidden ? StoryListId::archive() : StoryListId::main(), story_list);
update_story_list_sent_total_count(is_hidden ? StoryListId::archive() : StoryListId::main(), story_list);
break;
}
default:
@ -1278,7 +1278,7 @@ td_api::object_ptr<td_api::updateStoryListChatCount> StoryManager::get_update_st
story_list.sent_total_count_);
}
void StoryManager::update_sent_total_count(StoryListId story_list_id, StoryList &story_list) {
void StoryManager::update_story_list_sent_total_count(StoryListId story_list_id, StoryList &story_list) {
if (story_list.list_last_story_date_ == MIN_DIALOG_DATE || story_list.server_total_count_ == -1) {
return;
}
@ -2538,7 +2538,7 @@ void StoryManager::on_update_active_stories(DialogId owner_dialog_id, StoryId ma
LOG(INFO) << "Delete active stories for " << owner_dialog_id;
if (active_stories->story_list_id_.is_valid()) {
delete_active_stories_from_story_list(owner_dialog_id, active_stories);
update_sent_total_count(active_stories->story_list_id_,
update_story_list_sent_total_count(active_stories->story_list_id_,
story_lists_[active_stories->story_list_id_ == StoryListId::archive()]);
}
active_stories_.erase(owner_dialog_id);
@ -2622,14 +2622,14 @@ bool StoryManager::update_active_stories_order(DialogId owner_dialog_id, ActiveS
CHECK(is_inserted);
if (active_stories->story_list_id_ != story_list_id) {
update_sent_total_count(active_stories->story_list_id_,
update_story_list_sent_total_count(active_stories->story_list_id_,
story_lists_[active_stories->story_list_id_ == StoryListId::archive()]);
}
update_sent_total_count(story_list_id, story_list);
update_story_list_sent_total_count(story_list_id, story_list);
}
} else if (active_stories->story_list_id_.is_valid()) {
delete_active_stories_from_story_list(owner_dialog_id, active_stories);
update_sent_total_count(active_stories->story_list_id_,
update_story_list_sent_total_count(active_stories->story_list_id_,
story_lists_[active_stories->story_list_id_ == StoryListId::archive()]);
}

View File

@ -360,7 +360,7 @@ class StoryManager final : public Actor {
td_api::object_ptr<td_api::updateStoryListChatCount> get_update_story_list_chat_count_object(
StoryListId story_list_id, const StoryList &story_list) const;
void update_sent_total_count(StoryListId story_list_id, StoryList &story_list);
void update_story_list_sent_total_count(StoryListId story_list_id, StoryList &story_list);
vector<FileId> get_story_file_ids(const Story *story) const;