mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-26 03:58:44 +00:00
update FlowsUsh
This commit is contained in:
parent
8b79b15777
commit
633239961a
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user