diff --git a/CHANGELOG.md b/CHANGELOG.md index 821aa8e4d02..a2db76ddf4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 0.3.3 +* `Coroutines`: + * New extension `Flow#plus` + ## 0.3.2 * `Versions`: diff --git a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowsSum.kt b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowsSum.kt new file mode 100644 index 00000000000..3c3fe0f87e0 --- /dev/null +++ b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowsSum.kt @@ -0,0 +1,8 @@ +@file:Suppress("NOTHING_TO_INLINE") + +package dev.inmo.micro_utils.coroutines + +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.merge + +inline operator fun Flow.plus(other: Flow) = merge(this, other)