diff --git a/CHANGELOG.md b/CHANGELOG.md index 5491320f880..9076a6f3a37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ * `Pagination` * `Common` * `Pagination` got new extension: `Pagination#isFirstPage` +* `Coroutines`: + * New extension `FlowCollector#invoke` has been added ## 0.4.5 diff --git a/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowCollectorInvoking.kt b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowCollectorInvoking.kt new file mode 100644 index 00000000000..8ae54ebfc75 --- /dev/null +++ b/coroutines/src/commonMain/kotlin/dev/inmo/micro_utils/coroutines/FlowCollectorInvoking.kt @@ -0,0 +1,5 @@ +package dev.inmo.micro_utils.coroutines + +import kotlinx.coroutines.flow.FlowCollector + +suspend inline operator fun FlowCollector.invoke(value: T) = emit(value)