From 735ed9fd868aa7d873878f7b8db944f796dc1c77 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 15 May 2020 18:31:49 +0600 Subject: [PATCH] change flowsUpdatesFilter signature --- .../extensions/utils/updates/FlowsUpdatesFactory.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/FlowsUpdatesFactory.kt b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/FlowsUpdatesFactory.kt index 297706c5b7..08d3cb7b77 100644 --- a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/FlowsUpdatesFactory.kt +++ b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/updates/FlowsUpdatesFactory.kt @@ -4,20 +4,12 @@ import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.FlowsUpdatesFi /** * Non-suspendable function for easy-to-use creating of [FlowsUpdatesFilter] and applying the block to it - */ -fun flowsUpdatesFilter( - internalChannelsSizes: Int = 64, - block: FlowsUpdatesFilter.() -> Unit -): FlowsUpdatesFilter = FlowsUpdatesFilter(internalChannelsSizes).apply(block) - -/** - * Suspend variation for [flowsUpdatesFilter] function * * @see flowsUpdatesFilter */ -suspend fun flowsUpdatesFilter( +inline fun flowsUpdatesFilter( internalChannelsSizes: Int = 64, - block: suspend FlowsUpdatesFilter.() -> Unit + block: FlowsUpdatesFilter.() -> Unit ): FlowsUpdatesFilter { val filter = FlowsUpdatesFilter(internalChannelsSizes) filter.block()