Clear more data about deleted stories.

This commit is contained in:
levlam 2023-07-04 13:42:03 +03:00
parent c19cb9b623
commit 4898f42121
2 changed files with 4 additions and 2 deletions

View File

@ -2112,6 +2112,8 @@ void StoryManager::on_delete_story(StoryFullId story_full_id) {
delete_story_files(story);
unregister_story_global_id(story);
stories_.erase(story_full_id);
being_edited_stories_.erase(story_full_id);
cached_story_viewers_.erase(story_full_id);
auto active_stories = get_active_stories(owner_dialog_id);
if (active_stories != nullptr && contains(active_stories->story_ids_, story_id)) {

View File

@ -413,6 +413,8 @@ class StoryManager final : public Actor {
FlatHashMap<StoryFullId, vector<Promise<Unit>>, StoryFullIdHash> reload_story_queries_;
FlatHashMap<FileId, unique_ptr<PendingStory>, FileIdHash> being_uploaded_files_;
StoryList story_lists_[2];
uint32 send_story_count_ = 0;
@ -421,8 +423,6 @@ class StoryManager final : public Actor {
bool has_active_synchronize_archive_all_stories_query_ = false;
FlatHashMap<FileId, unique_ptr<PendingStory>, FileIdHash> being_uploaded_files_;
Timeout interaction_info_update_timeout_;
MultiTimeout story_reload_timeout_{"StoryReloadTimeout"};