Skip to content

Commit dda6dc3

Browse files
committed
Enable Both slot Flash options (Add Inactive slot flash warning) : Try 10
1 parent d2955c4 commit dda6dc3

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ class SlotViewModel(
184184
}
185185

186186
@Suppress("SameParameterValue")
187-
private suspend fun uiPrint(message: String) {
188-
withContext (Dispatchers.Main) {
187+
private fun uiPrint(message: String) {
188+
viewModelScope.launch(Dispatchers.Main) {
189189
_flashOutput.add("ui_print $message")
190190
// _flashOutput.add("ui_print")
191191
}
192192
}
193193

194194
// TODO: use base class for common functions
195-
private suspend fun addMessage(message: String) {
196-
withContext (Dispatchers.Main) {
195+
private fun addMessage(message: String) {
196+
viewModelScope.launch(Dispatchers.Main) {
197197
_flashOutput.add(message)
198198
}
199199
}

0 commit comments

Comments
 (0)