Skip to content

Commit

Permalink
Fix searching id in media widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishka17 committed Dec 30, 2023
1 parent 2491a80 commit 48c2ec1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/aiogram_dialog/api/internal/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from aiogram_dialog.api.entities import NewMessage
from aiogram_dialog.api.protocols import DialogProtocol
from .manager import DialogManager
from .widgets import RawKeyboard
from .widgets import MarkupVariant


class WindowProtocol(Protocol):
Expand All @@ -23,7 +23,7 @@ async def render_text(self, data: Dict,
@abstractmethod
async def render_kbd(
self, data: Dict, manager: DialogManager,
) -> RawKeyboard:
) -> MarkupVariant:
raise NotImplementedError

@abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion src/aiogram_dialog/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def get_state(self) -> State:
return self.state

def find(self, widget_id) -> Optional[Widget]:
for root in (self.text, self.keyboard, self.on_message):
for root in (self.text, self.keyboard, self.on_message, self.media):
if root:
if found := root.find(widget_id):
return found
Expand Down

0 comments on commit 48c2ec1

Please sign in to comment.