File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -173,16 +173,16 @@ class SlotViewModel(
173
173
}
174
174
175
175
@Suppress(" SameParameterValue" )
176
- private suspend fun uiPrint (message : String ) {
177
- withContext (Dispatchers .Main ) {
176
+ private fun uiPrint (message : String ) {
177
+ viewModelScope.launch (Dispatchers .Main ) {
178
178
_flashOutput .add(" ui_print $message " )
179
- _flashOutput .add(" ui_print" )
179
+ _flashOutput .add(" ui_print" )
180
180
}
181
181
}
182
182
183
183
// 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 ) {
186
186
_flashOutput .add(message)
187
187
}
188
188
}
You can’t perform that action at this time.
0 commit comments