Skip to content

Commit 4bb414a

Browse files
Enable Both slot Flash options (Add Inactive slot flash warning) : Try 10
1 parent d93f3aa commit 4bb414a

File tree

1 file changed

+5
-5
lines changed
  • app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot

1 file changed

+5
-5
lines changed

app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot/SlotViewModel.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,16 @@ class SlotViewModel(
173173
}
174174

175175
@Suppress("SameParameterValue")
176-
private suspend fun uiPrint(message: String) {
177-
withContext (Dispatchers.Main) {
176+
private fun uiPrint(message: String) {
177+
viewModelScope.launch(Dispatchers.Main) {
178178
_flashOutput.add("ui_print $message")
179-
_flashOutput.add(" ui_print")
179+
_flashOutput.add("ui_print")
180180
}
181181
}
182182

183183
// TODO: use base class for common functions
184-
private suspend fun addMessage(message: String) {
185-
withContext (Dispatchers.Main) {
184+
private fun addMessage(message: String) {
185+
viewModelScope.launch(Dispatchers.Main) {
186186
_flashOutput.add(message)
187187
}
188188
}

0 commit comments

Comments
 (0)