mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2026-10-25 14:07:28 +00:00
add ReplaceWith to old functions and replace built-in usages of deprecations
This commit is contained in:
1 parent
1dc80f6929
commit
d67d16c72d
7 files changed
+23
-15
No files matched your search
@@ -55,7 +55,11 @@ fun createMarkdownText(
|
||||
}
|
||||
|
||||
@Deprecated(
|
||||
"Deprecated because old version have problem with long texts, but new one must return list of strings"
|
||||
"Deprecated because old version have problem with long texts, but new one must return list of strings",
|
||||
ReplaceWith(
|
||||
"toMarkdownCaptions().firstOrNull()",
|
||||
"com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownCaptions"
|
||||
)
|
||||
)
|
||||
fun CaptionedMediaContent.toMarkdownCaption(): String? = toMarkdownCaptions().firstOrNull()
|
||||
|
||||
@@ -69,7 +73,11 @@ fun CaptionedMediaContent.fullEntitiesList(): List<MessageEntity> = caption ?.le
|
||||
} ?: emptyList()
|
||||
|
||||
@Deprecated(
|
||||
"Deprecated because old version have problem with long texts, but new one must return list of strings"
|
||||
"Deprecated because old version have problem with long texts, but new one must return list of strings",
|
||||
ReplaceWith(
|
||||
"toMarkdownTexts().first()",
|
||||
"com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownTexts"
|
||||
)
|
||||
)
|
||||
fun TextContent.toMarkdownText(): String = toMarkdownTexts().first()
|
||||
|
||||
|
||||
Reference in new issue
Block a user