1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +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() val allUpdatesFlow: Flow<Update> = updatesSharedFlow.asSharedFlow()
@Suppress("MemberVisibilityCanBePrivate") @Suppress("MemberVisibilityCanBePrivate")
val allUpdatesWithoutMediaGroupsGroupingFlow: Flow<Update> = updatesSharedFlow.flatMapConcat { val allUpdatesWithoutMediaGroupsGroupingFlow: Flow<Update> = updatesSharedFlow.flatMapConcat {
(if (it is SentMediaGroupUpdate) { when (it) {
it.origins is SentMediaGroupUpdate -> it.origins.asFlow()
} else { is EditMediaGroupUpdate -> flowOf(it.origin)
listOf(it) else -> flowOf(it)
}).asFlow() }
} }
override val allowedUpdates: List<String> override val allowedUpdates: List<String>