mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2026-03-03 17:42:21 +00:00
add showing of custom emoji in button
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import androidx.compose.runtime.*
|
import androidx.compose.runtime.*
|
||||||
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
|
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
|
||||||
|
import dev.inmo.tgbotapi.types.CustomEmojiId
|
||||||
import dev.inmo.tgbotapi.types.userIdField
|
import dev.inmo.tgbotapi.types.userIdField
|
||||||
import dev.inmo.tgbotapi.types.webAppQueryIdField
|
import dev.inmo.tgbotapi.types.webAppQueryIdField
|
||||||
import dev.inmo.tgbotapi.webapps.*
|
import dev.inmo.tgbotapi.webapps.*
|
||||||
@@ -395,6 +396,11 @@ fun main() {
|
|||||||
}
|
}
|
||||||
mainButton.apply {
|
mainButton.apply {
|
||||||
setText("Main button")
|
setText("Main button")
|
||||||
|
setParams(
|
||||||
|
BottomButtonParams(
|
||||||
|
iconCustomEmojiId = CustomEmojiId("5370976574969486150") // 😏
|
||||||
|
)
|
||||||
|
)
|
||||||
onClick {
|
onClick {
|
||||||
logsState.add("Main button clicked")
|
logsState.add("Main button clicked")
|
||||||
hapticFeedback.notificationOccurred(
|
hapticFeedback.notificationOccurred(
|
||||||
@@ -405,6 +411,11 @@ fun main() {
|
|||||||
}
|
}
|
||||||
secondaryButton.apply {
|
secondaryButton.apply {
|
||||||
setText("Secondary button")
|
setText("Secondary button")
|
||||||
|
setParams(
|
||||||
|
BottomButtonParams(
|
||||||
|
iconCustomEmojiId = CustomEmojiId("5370763368497944736") // 😒
|
||||||
|
)
|
||||||
|
)
|
||||||
onClick {
|
onClick {
|
||||||
logsState.add("Secondary button clicked")
|
logsState.add("Secondary button clicked")
|
||||||
hapticFeedback.notificationOccurred(
|
hapticFeedback.notificationOccurred(
|
||||||
|
|||||||
Reference in New Issue
Block a user