Fix keyboard builder

This commit is contained in:
2026-03-28 21:55:22 +03:00
parent 0e1b44a920
commit fc7ba16fab
5 changed files with 23 additions and 24 deletions
@@ -83,7 +83,7 @@ class FlowScreenResolverDelegate implements ScreenResolver {
if (context instanceof KeyboardProvider) {
final Keyboard keyboard = ((KeyboardProvider) context).getKeyboard();
if (keyboard == null) {
log.warn("Method 'getKeyboard' returns NULL value!", wrapper.getFactoryMethod());
log.warn("Method 'getKeyboard' {} returns NULL value!", wrapper.getFactoryMethod());
}
return keyboard;
}
@@ -106,12 +106,12 @@ class FlowScreenResolverDelegate implements ScreenResolver {
for (ButtonsRow row : wrapper.getRows()) {
List<Action> buttons = row.getButtons().stream()
.filter(btn -> checkIfCondition(context, btn.getIfCondition()))
.map(btn -> getAction(btn))
.map(this::getAction)
.collect(Collectors.toList());
log.info("Keyboard: {}", buttons);
builder.row(buttons.toArray(new Action[buttons.size()]));
builder.row(buttons.toArray(new Action[0]));
}
keyboard = builder.build();