mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-03-05 03:02:49 +00:00
The previous code would maintain items in the dispatch mapping if nested children were removed between calls because it would only remove items that are live in the view at the point of removal. This meant that calling something like ActionRow.clear_items() would keep all the removed items within the mapping and would not be evicted. This attempts to fix it by maintaining a cache state snapshot and making a diff between the two versions to know which keys are now safe to delete since they are no longer in the live view at all.