Show live background task counts
This commit is contained in:
1 parent
9fd21af4e8
commit
8262ceb786
16 files changed
+160
-29
No files matched your search
@@ -140,6 +140,9 @@ sealed class SessionEvent {
|
||||
/** The same command, handed to the session. */
|
||||
data class CommandSent(val id: String, val text: String) : SessionEvent()
|
||||
|
||||
/** Provider-reported number of background tasks alive now. */
|
||||
data class BackgroundTasks(val count: Int) : SessionEvent()
|
||||
|
||||
data class Status(val state: String) : SessionEvent()
|
||||
|
||||
/**
|
||||
@@ -283,6 +286,7 @@ fun parseSeqEvent(json: String): SeqEvent {
|
||||
"commandQueued" ->
|
||||
SessionEvent.CommandQueued(body.getString("id"), body.getString("text"))
|
||||
"commandSent" -> SessionEvent.CommandSent(body.getString("id"), body.getString("text"))
|
||||
"backgroundTasks" -> SessionEvent.BackgroundTasks(body.getInt("count"))
|
||||
"status" -> SessionEvent.Status(body.getString("state"))
|
||||
"settings" ->
|
||||
SessionEvent.Settings(
|
||||
|
||||
Reference in new issue
Block a user