1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-04 07:39:39 +00:00

update previews

This commit is contained in:
2022-05-09 02:27:06 +06:00
parent df01976ea8
commit cb37b85234
12 changed files with 21 additions and 19 deletions

View File

@@ -88,7 +88,6 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSMAndStartLongPolling(
* @see BehaviourContextWithFSM.strictlyOn
* @see BehaviourContextWithFSM.onStateOrSubstate
*/
@PreviewFeature
suspend fun <T : State> TelegramBot.buildBehaviourWithFSM(
flowUpdatesFilter: FlowsUpdatesFilter,
scope: CoroutineScope = defaultCoroutineScopeProvider(),
@@ -117,7 +116,6 @@ suspend fun <T : State> TelegramBot.buildBehaviourWithFSM(
* @see BehaviourContextWithFSM.strictlyOn
* @see BehaviourContextWithFSM.onStateOrSubstate
*/
@PreviewFeature
suspend fun <T : State> TelegramBot.buildBehaviourWithFSMAndStartLongPolling(
scope: CoroutineScope = defaultCoroutineScopeProvider(),
defaultExceptionsHandler: ExceptionHandler<Unit>? = null,

View File

@@ -38,6 +38,7 @@ class BehaviourWithFSMStateHandlerHolder<I : O, O : State>(
suspend fun BehaviourContextWithFSM<in O>.handleState(
state: O
): O? = with(delegateTo) {
@Suppress("UNCHECKED_CAST")
handleState(state as I)
}
}