Skip to content

Commit 1a45332

Browse files
add showing of custom emoji in button
1 parent e304a5e commit 1a45332

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

WebApp/src/jsMain/kotlin/main.kt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import androidx.compose.runtime.*
22
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
3+
import dev.inmo.tgbotapi.types.CustomEmojiId
34
import dev.inmo.tgbotapi.types.userIdField
45
import dev.inmo.tgbotapi.types.webAppQueryIdField
56
import dev.inmo.tgbotapi.webapps.*
@@ -395,6 +396,11 @@ fun main() {
395396
}
396397
mainButton.apply {
397398
setText("Main button")
399+
setParams(
400+
BottomButtonParams(
401+
iconCustomEmojiId = CustomEmojiId("5370976574969486150") // 😏
402+
)
403+
)
398404
onClick {
399405
logsState.add("Main button clicked")
400406
hapticFeedback.notificationOccurred(
@@ -405,6 +411,11 @@ fun main() {
405411
}
406412
secondaryButton.apply {
407413
setText("Secondary button")
414+
setParams(
415+
BottomButtonParams(
416+
iconCustomEmojiId = CustomEmojiId("5370763368497944736") // 😒
417+
)
418+
)
408419
onClick {
409420
logsState.add("Secondary button clicked")
410421
hapticFeedback.notificationOccurred(

0 commit comments

Comments
 (0)