Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- #2045 add action to input on-screen keyboard enter/send button.
- #2106 disable the keyboard auto-switching setting when manually switching the keyboard in the Key Mapper homescreen menu.
- #1029 add action to show a toast message.
- #2081 add getevent debug screen.

## Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,22 @@ sealed class ActionData : Comparable<ActionData> {
}
}

@Serializable
data class Toast(val message: String, val duration: Duration) : ActionData() {
override val id: ActionId = ActionId.TOAST

@Serializable
enum class Duration {
SHORT,
LONG,
}

override fun compareTo(other: ActionData) = when (other) {
is Toast -> compareValuesBy(this, other, { it.message }, { it.duration })
else -> super.compareTo(other)
}
}

@Serializable
data object AnswerCall : ActionData() {
override val id: ActionId = ActionId.ANSWER_PHONE_CALL
Expand Down
Loading
Loading