@@ -10,14 +10,19 @@ import androidx.compose.foundation.layout.fillMaxWidth
10
10
import androidx.compose.foundation.layout.height
11
11
import androidx.compose.foundation.layout.offset
12
12
import androidx.compose.foundation.shape.RoundedCornerShape
13
+ import androidx.compose.foundation.layout.Arrangement
14
+ import androidx.compose.foundation.layout.padding
13
15
import androidx.compose.material.ExperimentalMaterialApi
14
16
import androidx.compose.material3.ButtonDefaults
15
17
import androidx.compose.material3.Checkbox
16
18
import androidx.compose.material3.ExperimentalMaterial3Api
17
19
import androidx.compose.material3.MaterialTheme
18
20
import androidx.compose.material3.OutlinedButton
19
21
import androidx.compose.material3.Text
22
+ import androidx.compose.material3.AlertDialog
20
23
import androidx.compose.runtime.Composable
24
+ import androidx.compose.runtime.getValue
25
+ import androidx.compose.runtime.livedata.observeAsState
21
26
import androidx.compose.ui.Alignment
22
27
import androidx.compose.ui.Modifier
23
28
import androidx.compose.ui.draw.alpha
@@ -47,6 +52,8 @@ fun ColumnScope.SlotFlashContent(
47
52
navController : NavController
48
53
) {
49
54
val context = LocalContext .current
55
+ val showDialog by viewModel.showCautionDialog.observeAsState()
56
+
50
57
if (! listOf (" /flash/ak3" , " /flash/image/flash" , " /backup/backup" ).any { navController.currentDestination!! .route!! .endsWith(it) }) {
51
58
SlotCard (
52
59
title = stringResource(if (slotSuffix == " _a" ) R .string.slot_a else if (slotSuffix == " _b" ) R .string.slot_b else R .string.slot),
@@ -178,7 +185,7 @@ fun ColumnScope.SlotFlashContent(
178
185
Column (verticalArrangement = Arrangement .spacedBy(8 .dp)) {
179
186
Text (" You have flashed AnyKernel Zip to inactive slot!" )
180
187
Text (" But the active slot is not changed after flashing." )
181
- Text (" Use bootctl to change active slot or return to System Updater to complete OTA." )
188
+ Text (" Change active slot or return to System Updater to complete OTA." )
182
189
Text (" Do not reboot from here, unless you know what you are doing." )
183
190
}
184
191
},
0 commit comments