mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 16:23:48 +00:00
fixes of warnings
This commit is contained in:
parent
fa43a55f26
commit
0260e7bedc
@ -61,6 +61,7 @@
|
|||||||
* `BasketballDiceAnimationType` was added
|
* `BasketballDiceAnimationType` was added
|
||||||
* `UnknownDiceAnimationType` now is deprecated due to renaming - currently it is typealias for `CustomDiceAnimationType`
|
* `UnknownDiceAnimationType` now is deprecated due to renaming - currently it is typealias for `CustomDiceAnimationType`
|
||||||
* `CustomDiceAnimationType` now is `data` class instead of common class
|
* `CustomDiceAnimationType` now is `data` class instead of common class
|
||||||
|
* `FlowsUpdatesFilter` will use size 64 by default for internal broadcast channels
|
||||||
* `TelegramBotAPI-extensions-api`:
|
* `TelegramBotAPI-extensions-api`:
|
||||||
* Long Polling extensions now are deprecated in this project. It was replaced into `TelegramBotAPI-extensions-utils`
|
* Long Polling extensions now are deprecated in this project. It was replaced into `TelegramBotAPI-extensions-utils`
|
||||||
* Several `telegramBot` functions was renamed into `telegramBotWithCustomClientConfig`
|
* Several `telegramBot` functions was renamed into `telegramBotWithCustomClientConfig`
|
||||||
|
@ -40,6 +40,7 @@ fun SetWebhook(
|
|||||||
allowedUpdates
|
allowedUpdates
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Suppress("USELESS_CAST")
|
||||||
fun SetWebhook(
|
fun SetWebhook(
|
||||||
url: String,
|
url: String,
|
||||||
certificate: InputFile,
|
certificate: InputFile,
|
||||||
|
@ -3,17 +3,16 @@ package com.github.insanusmokrassar.TelegramBotAPI.updateshandlers
|
|||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.update.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.update.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.*
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update
|
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update
|
||||||
import kotlinx.coroutines.FlowPreview
|
|
||||||
import kotlinx.coroutines.channels.BroadcastChannel
|
import kotlinx.coroutines.channels.BroadcastChannel
|
||||||
import kotlinx.coroutines.channels.Channel
|
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.asFlow
|
import kotlinx.coroutines.flow.asFlow
|
||||||
|
|
||||||
|
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||||
private fun <T> BroadcastChannel<T>.createUpdateReceiver(): UpdateReceiver<T> = ::send
|
private fun <T> BroadcastChannel<T>.createUpdateReceiver(): UpdateReceiver<T> = ::send
|
||||||
|
|
||||||
@FlowPreview
|
@Suppress("EXPERIMENTAL_API_USAGE", "unused")
|
||||||
class FlowsUpdatesFilter(
|
class FlowsUpdatesFilter(
|
||||||
broadcastChannelsSize: Int = Channel.CONFLATED
|
broadcastChannelsSize: Int = 64
|
||||||
): UpdatesFilter {
|
): UpdatesFilter {
|
||||||
private val messageChannel: BroadcastChannel<MessageUpdate> = BroadcastChannel(broadcastChannelsSize)
|
private val messageChannel: BroadcastChannel<MessageUpdate> = BroadcastChannel(broadcastChannelsSize)
|
||||||
private val messageMediaGroupChannel: BroadcastChannel<MessageMediaGroupUpdate> = BroadcastChannel(broadcastChannelsSize)
|
private val messageMediaGroupChannel: BroadcastChannel<MessageMediaGroupUpdate> = BroadcastChannel(broadcastChannelsSize)
|
||||||
|
Loading…
Reference in New Issue
Block a user