make force refresh button optional

This commit is contained in:
InsanusMokrassar 2022-09-16 21:11:30 +06:00
parent 79c195f534
commit b9700a8fd9

View File

@ -41,7 +41,7 @@ object Plugin : Plugin {
val buttonsPerRow: Int = 4, val buttonsPerRow: Int = 4,
val deleteButtonText: String? = null, val deleteButtonText: String? = null,
val rootButtonText: String = "\uD83D\uDD19", val rootButtonText: String = "\uD83D\uDD19",
val refreshButtonText: String = "\uD83D\uDD04" val refreshButtonText: String? = "\uD83D\uDD04"
) )
override fun Module.setupDI(database: Database, params: JsonObject) { override fun Module.setupDI(database: Database, params: JsonObject) {
params["panel"] ?.let { element -> params["panel"] ?.let { element ->
@ -58,7 +58,7 @@ object Plugin : Plugin {
) )
} }
}, },
config.refreshButtonText.let { text -> config.refreshButtonText ?.let { text ->
PanelButtonBuilder { PanelButtonBuilder {
CallbackDataInlineKeyboardButton( CallbackDataInlineKeyboardButton(
text, text,