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(
40
40
AnimatedVisibility (! viewModel.isRefreshing) {
41
41
Column {
42
42
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" )
53
49
}
50
+ ) {
51
+ Text (stringResource(R .string.flash))
54
52
}
55
53
OutlinedButton (
56
54
modifier = Modifier
@@ -63,17 +61,15 @@ fun ColumnScope.SlotContent(
63
61
) {
64
62
Text (stringResource(R .string.backup))
65
63
}
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" )
76
70
}
71
+ ) {
72
+ Text (stringResource(R .string.restore))
77
73
}
78
74
OutlinedButton (
79
75
modifier = Modifier
Original file line number Diff line number Diff line change @@ -429,10 +429,10 @@ class SlotViewModel(
429
429
}
430
430
431
431
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
436
436
}
437
437
438
438
@Suppress(" FunctionName" )
You can’t perform that action at this time.
0 commit comments