Skip to content

Commit

Permalink
Merge pull request #374 from KuroKoka551/develop
Browse files Browse the repository at this point in the history
fixed bug with "Or (Keyboard)"
  • Loading branch information
Tishka17 authored Feb 27, 2024
2 parents 1712cc7 + 65a5cef commit 8c1aa0e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/aiogram_dialog/widgets/kbd/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
from aiogram_dialog.api.internal import KeyboardWidget, RawKeyboard
from aiogram_dialog.api.protocols import DialogManager, DialogProtocol
from aiogram_dialog.widgets.common import (
Actionable, Whenable, WhenCondition,
Actionable,
Whenable,
WhenCondition,
)


Expand Down Expand Up @@ -135,6 +137,17 @@ async def _render_keyboard(
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,)
return self
Expand Down

0 comments on commit 8c1aa0e

Please sign in to comment.