mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 00:03:48 +00:00
media group optimizations
This commit is contained in:
parent
d9e1643823
commit
7d1871d8dc
@ -51,6 +51,8 @@ media for present out)
|
||||
|
||||
### 0.12.4 UpdatesPoller optimisations
|
||||
|
||||
* Optimized preparing of media group in `UpdatesPoller`
|
||||
|
||||
## 0.11.0
|
||||
|
||||
* Kotlin `1.3.11` -> `1.3.21`
|
||||
|
@ -31,7 +31,8 @@ class UpdatesPoller(
|
||||
private suspend fun pushMediaGroupUpdate(update: BaseMessageUpdate? = null) {
|
||||
val inputMediaGroupId = (update ?.data as? MediaGroupMessage) ?.mediaGroupId
|
||||
if (mediaGroup.isNotEmpty() && inputMediaGroupId ?.equals(mediaGroup.mediaGroupId) != true) {
|
||||
listOf(*mediaGroup.toTypedArray()).toMediaGroupUpdate() ?.let {
|
||||
mediaGroup.sortBy { it.updateId }
|
||||
mediaGroup.toMediaGroupUpdate() ?.let {
|
||||
sendToBlock(it)
|
||||
} ?: mediaGroup.forEach {
|
||||
sendToBlock(it)
|
||||
|
Loading…
Reference in New Issue
Block a user