mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +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()
|
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>
|
||||||
|
Loading…
Reference in New Issue
Block a user