Skip to content

Commit

Permalink
fixed bug with "Or(Keyboard)"
Browse files Browse the repository at this point in the history
  • Loading branch information
KurosawaAngel committed Feb 27, 2024
1 parent 1712cc7 commit 07786fe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/aiogram_dialog/widgets/kbd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ async def _render_keyboard(
if res and any(res):
return res
return []

async def _process_other_callback(
self,
callback: CallbackQuery,
dialog: DialogProtocol,
manager: DialogManager,
) -> bool:
for b in self.widgets:
if await b.process_callback(callback, dialog, manager):
return True
return False

def __ior__(self, other: Keyboard) -> "Or":
self.widgets += (other,)
Expand Down

0 comments on commit 07786fe

Please sign in to comment.