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})";
|
button.Text += $" ({currentChoice.ShortName})";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case OptionType.Hidden:
|
||||||
|
{
|
||||||
|
button = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return button;
|
return button;
|
||||||
@@ -185,6 +191,7 @@ public class SettingsHandler : CommonHandler
|
|||||||
{
|
{
|
||||||
var keyboardLayout = _options.ToAsyncEnumerable()
|
var keyboardLayout = _options.ToAsyncEnumerable()
|
||||||
.SelectAwait(async x => await GetKeyboardButton(x))
|
.SelectAwait(async x => await GetKeyboardButton(x))
|
||||||
|
.Where(x => x != null) // for OptionType.Hidden
|
||||||
.ToEnumerable()
|
.ToEnumerable()
|
||||||
.Chunk(2);
|
.Chunk(2);
|
||||||
|
|
||||||
|
|||||||
@@ -3,5 +3,6 @@
|
|||||||
public enum OptionType
|
public enum OptionType
|
||||||
{
|
{
|
||||||
OnOff,
|
OnOff,
|
||||||
Select
|
Select,
|
||||||
|
Hidden
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user