mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Correctly clear story instances on deletion.
This commit is contained in:
@@ -723,6 +723,16 @@ void Stories::applyDeleted(FullStoryId id) {
|
||||
}
|
||||
_owner->refreshStoryItemViews(id);
|
||||
Assert(!_pollingSettings.contains(story.get()));
|
||||
if (const auto j = _items.find(id.peer); j != end(_items)) {
|
||||
const auto k = j->second.find(id.story);
|
||||
if (k != end(j->second)) {
|
||||
Assert(!k->second.lock());
|
||||
j->second.erase(k);
|
||||
if (j->second.empty()) {
|
||||
_items.erase(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i->second.empty()) {
|
||||
_stories.erase(i);
|
||||
}
|
||||
|
Reference in New Issue
Block a user