cleaning
This commit is contained in:
parent
c4ea2507f8
commit
3ac54c51f6
|
@ -41,8 +41,8 @@ enum class Command(val command: String, val parameters: String, @StringRes val d
|
||||||
RAINBOW_EMOTE("/rainbowme", "<message>", R.string.command_description_rainbow_emote),
|
RAINBOW_EMOTE("/rainbowme", "<message>", R.string.command_description_rainbow_emote),
|
||||||
CLEAR_SCALAR_TOKEN("/clear_scalar_token", "", R.string.command_description_clear_scalar_token),
|
CLEAR_SCALAR_TOKEN("/clear_scalar_token", "", R.string.command_description_clear_scalar_token),
|
||||||
SPOILER("/spoiler", "<message>", R.string.command_description_spoiler),
|
SPOILER("/spoiler", "<message>", R.string.command_description_spoiler),
|
||||||
|
POLL("/poll", "Question | Option 1 | Option 2 ...", R.string.command_description_poll),
|
||||||
SHRUG("/shrug", "<message>", R.string.command_description_shrug),
|
SHRUG("/shrug", "<message>", R.string.command_description_shrug),
|
||||||
SPOILER("/spoiler", "<message>", R.string.command_description_spoiler),
|
|
||||||
// TODO temporary command
|
// TODO temporary command
|
||||||
VERIFY_USER("/verify", "<user-id>", R.string.command_description_verify);
|
VERIFY_USER("/verify", "<user-id>", R.string.command_description_verify);
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,12 @@ object CommandParser {
|
||||||
|
|
||||||
ParsedCommand.SendEmote(message)
|
ParsedCommand.SendEmote(message)
|
||||||
}
|
}
|
||||||
Command.RAINBOW.command -> {
|
Command.RAINBOW.command -> {
|
||||||
val message = textMessage.subSequence(Command.RAINBOW.command.length, textMessage.length).trim()
|
val message = textMessage.subSequence(Command.RAINBOW.command.length, textMessage.length).trim()
|
||||||
|
|
||||||
ParsedCommand.SendRainbow(message)
|
ParsedCommand.SendRainbow(message)
|
||||||
}
|
}
|
||||||
Command.RAINBOW_EMOTE.command -> {
|
Command.RAINBOW_EMOTE.command -> {
|
||||||
val message = textMessage.subSequence(Command.RAINBOW_EMOTE.command.length, textMessage.length).trim()
|
val message = textMessage.subSequence(Command.RAINBOW_EMOTE.command.length, textMessage.length).trim()
|
||||||
|
|
||||||
ParsedCommand.SendRainbowEmote(message)
|
ParsedCommand.SendRainbowEmote(message)
|
||||||
|
@ -258,7 +258,6 @@ object CommandParser {
|
||||||
|
|
||||||
ParsedCommand.SendShrug(message)
|
ParsedCommand.SendShrug(message)
|
||||||
}
|
}
|
||||||
|
|
||||||
Command.VERIFY_USER.command -> {
|
Command.VERIFY_USER.command -> {
|
||||||
val message = textMessage.substring(Command.VERIFY_USER.command.length).trim()
|
val message = textMessage.substring(Command.VERIFY_USER.command.length).trim()
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,11 @@ class MessageItemFactory @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun buildPollMessageItem(messageContent: MessageOptionsContent, informationData: MessageInformationData, highlight: Boolean, callback: TimelineEventController.Callback?, attributes: AbsMessageItem.Attributes): VectorEpoxyModel<*>? {
|
private fun buildPollMessageItem(messageContent: MessageOptionsContent,
|
||||||
|
informationData: MessageInformationData,
|
||||||
|
highlight: Boolean,
|
||||||
|
callback: TimelineEventController.Callback?,
|
||||||
|
attributes: AbsMessageItem.Attributes): VectorEpoxyModel<*>? {
|
||||||
return MessagePollItem_()
|
return MessagePollItem_()
|
||||||
.attributes(attributes)
|
.attributes(attributes)
|
||||||
.callback(callback)
|
.callback(callback)
|
||||||
|
|
Loading…
Reference in New Issue