Add QuickChatAction model

This commit is contained in:
Douile 2022-08-10 17:29:17 +01:00
parent 340061875f
commit 3c9e325d5c
No known key found for this signature in database
GPG key ID: DC9D70626CEF33D0
2 changed files with 18 additions and 0 deletions

View file

@ -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,
}
}

View file

@ -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)
}
}