Fix StoryManager::get_current_state.
This commit is contained in:
parent
abf32c44cc
commit
725d309eb1
@ -3788,15 +3788,13 @@ void StoryManager::remove_story_notifications_by_story_ids(DialogId dialog_id, c
|
||||
}
|
||||
|
||||
void StoryManager::get_current_state(vector<td_api::object_ptr<td_api::Update>> &updates) const {
|
||||
if (!td_->auth_manager_->is_bot()) {
|
||||
active_stories_.foreach([&](const DialogId &dialog_id, const unique_ptr<ActiveStories> &active_stories) {
|
||||
updates.push_back(get_update_chat_active_stories(dialog_id, active_stories.get()));
|
||||
});
|
||||
for (auto story_list_id : {StoryListId::main(), StoryListId::archive()}) {
|
||||
const auto &story_list = get_story_list(story_list_id);
|
||||
if (story_list.sent_total_count_ != -1) {
|
||||
send_closure(G()->td(), &Td::send_update, get_update_story_list_chat_count_object(story_list_id, story_list));
|
||||
}
|
||||
updates.push_back(get_update_story_list_chat_count_object(story_list_id, story_list));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user