1
0
mirror of https://github.com/Rapptz/discord.py.git synced 2025-05-15 02:09:49 +00:00

Fix Modal.stop sometimes not removing from the store

This commit is contained in:
Stella 2022-03-08 06:39:00 +08:00 committed by GitHub
parent 4ad6146069
commit 2b600241a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -503,13 +503,13 @@ class ViewStore:
del self._views[k]
def add_view(self, view: View, message_id: Optional[int] = None):
view._start_listening_from_store(self)
if view.__discord_ui_modal__:
self._modals[view.custom_id] = view # type: ignore
return
self.__verify_integrity()
view._start_listening_from_store(self)
for item in view.children:
if item.is_dispatchable():
self._views[(item.type.value, message_id, item.custom_id)] = (view, item) # type: ignore