mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
make new option type for internal purposes
This commit is contained in:
@@ -159,6 +159,12 @@ public class SettingsHandler : CommonHandler
|
||||
button.Text += $" ({currentChoice.ShortName})";
|
||||
break;
|
||||
}
|
||||
|
||||
case OptionType.Hidden:
|
||||
{
|
||||
button = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return button;
|
||||
@@ -185,6 +191,7 @@ public class SettingsHandler : CommonHandler
|
||||
{
|
||||
var keyboardLayout = _options.ToAsyncEnumerable()
|
||||
.SelectAwait(async x => await GetKeyboardButton(x))
|
||||
.Where(x => x != null) // for OptionType.Hidden
|
||||
.ToEnumerable()
|
||||
.Chunk(2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user