mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-24 02:58:43 +00:00
fix of modifyRow
This commit is contained in:
parent
41e369cea5
commit
5ce4e4cbc0
@ -97,9 +97,10 @@ open class MatrixBuilder<T> {
|
||||
exists.forEach { rowBuilder.add(it) }
|
||||
mutMatrix[i] = rowBuilder.apply(block).row
|
||||
}
|
||||
fun modifyRow(row: List<T>, block: RowBuilder<T>.() -> Unit) {
|
||||
fun modifyRow(row: List<T>, block: RowBuilder<T>.() -> Unit): Boolean {
|
||||
val i = mutMatrix.indexOf(row).takeIf { it > -1 } ?: return false
|
||||
modifyRow(i, block)
|
||||
return true
|
||||
}
|
||||
fun remove(i: Int): List<T> {
|
||||
return mutMatrix.removeAt(i)
|
||||
|
Loading…
Reference in New Issue
Block a user