mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
warnings fixes
This commit is contained in:
parent
3ee84700f4
commit
9747c8bff1
@ -68,7 +68,9 @@ fun RequestsExecutor.startGettingOfUpdates(
|
||||
* [kotlinx.coroutines.flow.Flow.collect] on one of [FlowsUpdatesFilter] flows. To avoid it, you can pass
|
||||
* [flowUpdatesPreset] lambda - it will be called BEFORE starting updates getting
|
||||
*/
|
||||
@FlowPreview
|
||||
@PreviewFeature
|
||||
@Suppress("unused")
|
||||
fun RequestsExecutor.startGettingFlowsUpdates(
|
||||
timeoutSeconds: Seconds = 30,
|
||||
scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
|
||||
@ -137,6 +139,7 @@ fun RequestsExecutor.startGettingOfUpdates(
|
||||
)
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
fun RequestsExecutor.startGettingOfUpdates(
|
||||
messageCallback: UpdateReceiver<MessageUpdate>? = null,
|
||||
mediaGroupCallback: UpdateReceiver<MediaGroupUpdate>? = null,
|
||||
|
@ -85,7 +85,7 @@ fun Poll.createRequest(
|
||||
correctOptionId,
|
||||
isAnonymous,
|
||||
isClosed,
|
||||
caption ?.fullListOfSubSource(captionEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
explanation ?.fullListOfSubSource(explanationEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
|
||||
MarkdownV2,
|
||||
scheduledCloseInfo,
|
||||
disableNotification,
|
||||
|
@ -212,8 +212,8 @@ internal object PollSerializer : KSerializer<Poll> {
|
||||
value.isAnonymous,
|
||||
regularPollType,
|
||||
correctOptionId = value.correctOptionId,
|
||||
explanation = value.caption,
|
||||
explanationEntities = value.captionEntities.asRawMessageEntities(),
|
||||
explanation = value.explanation,
|
||||
explanationEntities = value.explanationEntities.asRawMessageEntities(),
|
||||
openPeriod = (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.seconds ?.toLong(),
|
||||
closeDate = (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000L)
|
||||
)
|
||||
|
@ -3,6 +3,7 @@ package com.github.insanusmokrassar.TelegramBotAPI.utils
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
import kotlinx.serialization.json.*
|
||||
|
||||
@Suppress("EXPERIMENTAL_API_USAGE")
|
||||
internal val nonstrictJsonFormat = Json {
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
|
@ -4,9 +4,3 @@ import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonConfiguration
|
||||
|
||||
val TestsJsonFormat = Json(JsonConfiguration.Stable)
|
||||
val NonstrictTestsJsonFormat = Json {
|
||||
isLenient = true
|
||||
ignoreUnknownKeys = true
|
||||
serializeSpecialFloatingPointValues = true
|
||||
useArrayPolymorphism = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user