Fix keyboard builder
This commit is contained in:
+3
-3
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user