mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Add QuickChatAction model
This commit is contained in:
parent
340061875f
commit
3c9e325d5c
2 changed files with 18 additions and 0 deletions
|
|
@ -0,0 +1,11 @@
|
|||
package com.geeksville.mesh.model
|
||||
|
||||
data class QuickChatAction(
|
||||
val name: String,
|
||||
val message: String,
|
||||
val mode: Mode) {
|
||||
enum class Mode {
|
||||
Append,
|
||||
Instant,
|
||||
}
|
||||
}
|
||||
|
|
@ -445,5 +445,12 @@ class UIViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private val _quickChatActions = mutableListOf<QuickChatAction>()
|
||||
val quickChatActions: List<QuickChatAction> get() = _quickChatActions
|
||||
|
||||
fun addQuickChatAction(name: String, value: String, mode: QuickChatAction.Mode) {
|
||||
val action = QuickChatAction(name, value, mode)
|
||||
_quickChatActions.add(action)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue