mirror of
https://github.com/InsanusMokrassar/PlaguPoster.git
synced 2026-04-18 06:02:24 +00:00
add coloring of inline buttons
This commit is contained in:
@@ -113,7 +113,7 @@ object Plugin : Plugin {
|
||||
PanelButtonBuilder {
|
||||
CallbackDataInlineKeyboardButton(
|
||||
text,
|
||||
"publish ${it.id.string}"
|
||||
"publish ${it.id.string}",
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import dev.inmo.plaguposter.posts.models.RegisteredPost
|
||||
import dev.inmo.plaguposter.posts.panel.PanelButtonBuilder
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.CallbackDataInlineKeyboardButton
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.InlineKeyboardButton
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardButtonStyle
|
||||
|
||||
class TimerPanelButton(
|
||||
private val timersRepo: TimersRepo
|
||||
@@ -18,7 +19,12 @@ class TimerPanelButton(
|
||||
|
||||
return CallbackDataInlineKeyboardButton(
|
||||
"⏰ ${ if (publishingTime == null) UnsuccessfulSymbol else SuccessfulSymbol }",
|
||||
"$timerSetPrefix ${post.id}"
|
||||
"$timerSetPrefix ${post.id}",
|
||||
style = if (publishingTime == null) {
|
||||
null
|
||||
} else {
|
||||
KeyboardButtonStyle.Success
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user