Skip to content

Commit 33bb69a

Browse files
Enable Both slot Flash options (Add Inactive slot flash warning) : Try 8
1 parent 2a941d6 commit 33bb69a

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ class SlotViewModel(
174174

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

183183
// TODO: use base class for common functions
184184
private fun addMessage(message: String) {
185-
viewModelScope.launch(Dispatchers.Main) {
185+
withContext (Dispatchers.Main) {
186186
_flashOutput.add(message)
187187
}
188188
}
@@ -525,6 +525,10 @@ class SlotViewModel(
525525
} finally {
526526
uiPrint("")
527527
if (wasSlotReset) {
528+
uiPrint("CAUTION: You have flashed AnyKernel Zip to inactive slot!")
529+
uiPrint("But the active slot is not changed after flashing.")
530+
uiPrint("Use bootctl to change active slot or Return to System Updater to complete OTA.")
531+
uiPrint("Do not reboot from here, unless you know what you are doing.")
528532
resetSlot()
529533
}
530534
}

0 commit comments

Comments
 (0)