1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +00:00

new "row"

This commit is contained in:
InsanusMokrassar 2020-06-02 01:02:38 +06:00
parent 2a276d9272
commit 5fbde4bc06
2 changed files with 5 additions and 0 deletions

View File

@ -56,6 +56,7 @@
* `Klock`: `1.11.1` -> `1.11.3` * `Klock`: `1.11.1` -> `1.11.3`
* `TelegramotAPI`: * `TelegramotAPI`:
* Fix: for sending requests caption and text lengths limits were updated * Fix: for sending requests caption and text lengths limits were updated
* New variant of `row` was added
* `TelegramBotAPI-extensions-utils`: * `TelegramBotAPI-extensions-utils`:
* `safely` function was introduced. It is in `PreviewFeature` state currently * `safely` function was introduced. It is in `PreviewFeature` state currently

View File

@ -10,6 +10,10 @@ fun <T> MatrixBuilder<T>.row(block: RowBuilder<T>.() -> Unit) {
add(RowBuilder<T>().also(block).row) add(RowBuilder<T>().also(block).row)
} }
fun <T> MatrixBuilder<T>.row(vararg elements: T) {
add(elements.toList())
}
fun <T> matrix(block: MatrixBuilder<T>.() -> Unit): Matrix<T> { fun <T> matrix(block: MatrixBuilder<T>.() -> Unit): Matrix<T> {
return MatrixBuilder<T>().also(block).matrix return MatrixBuilder<T>().also(block).matrix
} }