1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

update FlowsUsh

This commit is contained in:
InsanusMokrassar 2021-01-07 19:02:35 +06:00
parent 8b79b15777
commit 633239961a

View File

@ -16,11 +16,11 @@ class FlowsUpdatesFilter(
val allUpdatesFlow: Flow<Update> = updatesSharedFlow.asSharedFlow()
@Suppress("MemberVisibilityCanBePrivate")
val allUpdatesWithoutMediaGroupsGroupingFlow: Flow<Update> = updatesSharedFlow.flatMapConcat {
(if (it is SentMediaGroupUpdate) {
it.origins
} else {
listOf(it)
}).asFlow()
when (it) {
is SentMediaGroupUpdate -> it.origins.asFlow()
is EditMediaGroupUpdate -> flowOf(it.origin)
else -> flowOf(it)
}
}
override val allowedUpdates: List<String>