Browse Source
Fix Modal.stop sometimes not removing from the store
pull/7587/head
Stella
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
discord/ui/view.py
|
|
@ -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 |
|
|
|