File tree Expand file tree Collapse file tree 2 files changed +20
-24
lines changed
app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/slot Expand file tree Collapse file tree 2 files changed +20
-24
lines changed Original file line number Diff line number Diff line change @@ -40,17 +40,15 @@ fun ColumnScope.SlotContent(
4040 AnimatedVisibility (! viewModel.isRefreshing) {
4141 Column {
4242 Spacer (Modifier .height(5 .dp))
43- if (viewModel.isActive) {
44- OutlinedButton (
45- modifier = Modifier
46- .fillMaxWidth(),
47- shape = RoundedCornerShape (4 .dp),
48- onClick = {
49- navController.navigate(" slot$slotSuffix /flash" )
50- }
51- ) {
52- Text (stringResource(R .string.flash))
43+ OutlinedButton (
44+ modifier = Modifier
45+ .fillMaxWidth(),
46+ shape = RoundedCornerShape (4 .dp),
47+ onClick = {
48+ navController.navigate(" slot$slotSuffix /flash" )
5349 }
50+ ) {
51+ Text (stringResource(R .string.flash))
5452 }
5553 OutlinedButton (
5654 modifier = Modifier
@@ -63,17 +61,15 @@ fun ColumnScope.SlotContent(
6361 ) {
6462 Text (stringResource(R .string.backup))
6563 }
66- if (viewModel.isActive) {
67- OutlinedButton (
68- modifier = Modifier
69- .fillMaxWidth(),
70- shape = RoundedCornerShape (4 .dp),
71- onClick = {
72- navController.navigate(" slot$slotSuffix /backups" )
73- }
74- ) {
75- Text (stringResource(R .string.restore))
64+ OutlinedButton (
65+ modifier = Modifier
66+ .fillMaxWidth(),
67+ shape = RoundedCornerShape (4 .dp),
68+ onClick = {
69+ navController.navigate(" slot$slotSuffix /backups" )
7670 }
71+ ) {
72+ Text (stringResource(R .string.restore))
7773 }
7874 OutlinedButton (
7975 modifier = Modifier
Original file line number Diff line number Diff line change @@ -429,10 +429,10 @@ class SlotViewModel(
429429 }
430430
431431 private fun resetSlot () {
432- val activeSlotSuffix = Shell .cmd(" getprop ro.boot.slot_suffix" ).exec().out [0 ]
433- val newSlot = if (activeSlotSuffix == " _a" ) " _b" else " _a"
434- Shell .cmd(" magisk resetprop -n ro.boot.slot_suffix $newSlot " ).exec()
435- wasSlotReset = ! wasSlotReset
432+ // val activeSlotSuffix = Shell.cmd("getprop ro.boot.slot_suffix").exec().out[0]
433+ // val newSlot = if (activeSlotSuffix == "_a") "_b" else "_a"
434+ // Shell.cmd("magisk resetprop -n ro.boot.slot_suffix $newSlot").exec()
435+ // wasSlotReset = !wasSlotReset
436436 }
437437
438438 @Suppress(" FunctionName" )
You can’t perform that action at this time.
0 commit comments