@@ -76,8 +76,8 @@ import app.revanced.manager.ui.component.haptics.HapticExtendedFloatingActionBut
7676import app.revanced.manager.ui.component.haptics.HapticTab
7777import app.revanced.manager.ui.component.patches.OptionItem
7878import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel
79+ import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_INCOMPATIBLE
7980import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_UNIVERSAL
80- import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_UNSUPPORTED
8181import app.revanced.manager.util.Options
8282import app.revanced.manager.util.PatchSelection
8383import app.revanced.manager.util.isScrollingUp
@@ -147,9 +147,9 @@ fun PatchesSelectorScreen(
147147 verticalArrangement = Arrangement .spacedBy(12 .dp)
148148 ) {
149149 CheckedFilterChip (
150- selected = vm.filter and SHOW_UNSUPPORTED == 0 ,
151- onClick = { vm.toggleFlag(SHOW_UNSUPPORTED ) },
152- label = { Text (stringResource(R .string.supported )) }
150+ selected = vm.filter and SHOW_INCOMPATIBLE == 0 ,
151+ onClick = { vm.toggleFlag(SHOW_INCOMPATIBLE ) },
152+ label = { Text (stringResource(R .string.this_version )) }
153153 )
154154
155155 CheckedFilterChip (
@@ -163,18 +163,18 @@ fun PatchesSelectorScreen(
163163 }
164164
165165 if (vm.compatibleVersions.isNotEmpty())
166- UnsupportedPatchDialog (
166+ IncompatiblePatchDialog (
167167 appVersion = vm.appVersion ? : stringResource(R .string.any_version),
168- supportedVersions = vm.compatibleVersions,
168+ compatibleVersions = vm.compatibleVersions,
169169 onDismissRequest = vm::dismissDialogs
170170 )
171- var showUnsupportedPatchesDialog by rememberSaveable {
171+ var showIncompatiblePatchesDialog by rememberSaveable {
172172 mutableStateOf(false )
173173 }
174- if (showUnsupportedPatchesDialog )
175- UnsupportedPatchesDialog (
174+ if (showIncompatiblePatchesDialog )
175+ IncompatiblePatchesDialog (
176176 appVersion = vm.appVersion ? : stringResource(R .string.any_version),
177- onDismissRequest = { showUnsupportedPatchesDialog = false }
177+ onDismissRequest = { showIncompatiblePatchesDialog = false }
178178 )
179179
180180 vm.optionsDialog?.let { (bundle, patch) ->
@@ -204,7 +204,7 @@ fun PatchesSelectorScreen(
204204 uid : Int ,
205205 patches : List <PatchInfo >,
206206 visible : Boolean ,
207- supported : Boolean ,
207+ compatible : Boolean ,
208208 header : (@Composable () -> Unit )? = null
209209 ) {
210210 if (patches.isNotEmpty() && visible) {
@@ -224,14 +224,14 @@ fun PatchesSelectorScreen(
224224 onOptionsDialog = {
225225 vm.optionsDialog = uid to patch
226226 },
227- selected = supported && vm.isSelected(
227+ selected = compatible && vm.isSelected(
228228 uid,
229229 patch
230230 ),
231231 onToggle = {
232232 when {
233- // Open unsupported dialog if the patch is not supported
234- ! supported -> vm.openUnsupportedDialog (patch)
233+ // Open incompatible dialog if the patch is not supported
234+ ! compatible -> vm.openIncompatibleDialog (patch)
235235
236236 // Show selection warning if enabled
237237 vm.selectionWarningEnabled -> showSelectionWarning = true
@@ -245,7 +245,7 @@ fun PatchesSelectorScreen(
245245 else -> vm.togglePatch(uid, patch)
246246 }
247247 },
248- supported = supported
248+ compatible = compatible
249249 )
250250 }
251251 }
@@ -321,15 +321,15 @@ fun PatchesSelectorScreen(
321321
322322 patchList(
323323 uid = bundle.uid,
324- patches = bundle.supported .searched(),
324+ patches = bundle.compatible .searched(),
325325 visible = true ,
326- supported = true
326+ compatible = true
327327 )
328328 patchList(
329329 uid = bundle.uid,
330330 patches = bundle.universal.searched(),
331331 visible = vm.filter and SHOW_UNIVERSAL != 0 ,
332- supported = true
332+ compatible = true
333333 ) {
334334 ListHeader (
335335 title = stringResource(R .string.universal_patches),
@@ -338,13 +338,13 @@ fun PatchesSelectorScreen(
338338
339339 patchList(
340340 uid = bundle.uid,
341- patches = bundle.unsupported .searched(),
342- visible = vm.filter and SHOW_UNSUPPORTED != 0 ,
343- supported = vm.allowIncompatiblePatches
341+ patches = bundle.incompatible .searched(),
342+ visible = vm.filter and SHOW_INCOMPATIBLE != 0 ,
343+ compatible = vm.allowIncompatiblePatches
344344 ) {
345345 ListHeader (
346- title = stringResource(R .string.unsupported_patches ),
347- onHelpClick = { showUnsupportedPatchesDialog = true }
346+ title = stringResource(R .string.incompatible_patches ),
347+ onHelpClick = { showIncompatiblePatchesDialog = true }
348348 )
349349 }
350350 }
@@ -427,29 +427,29 @@ fun PatchesSelectorScreen(
427427 ) {
428428 patchList(
429429 uid = bundle.uid,
430- patches = bundle.supported ,
430+ patches = bundle.compatible ,
431431 visible = true ,
432- supported = true
432+ compatible = true
433433 )
434434 patchList(
435435 uid = bundle.uid,
436436 patches = bundle.universal,
437437 visible = vm.filter and SHOW_UNIVERSAL != 0 ,
438- supported = true
438+ compatible = true
439439 ) {
440440 ListHeader (
441441 title = stringResource(R .string.universal_patches),
442442 )
443443 }
444444 patchList(
445445 uid = bundle.uid,
446- patches = bundle.unsupported ,
447- visible = vm.filter and SHOW_UNSUPPORTED != 0 ,
448- supported = vm.allowIncompatiblePatches
446+ patches = bundle.incompatible ,
447+ visible = vm.filter and SHOW_INCOMPATIBLE != 0 ,
448+ compatible = vm.allowIncompatiblePatches
449449 ) {
450450 ListHeader (
451- title = stringResource(R .string.unsupported_patches ),
452- onHelpClick = { showUnsupportedPatchesDialog = true }
451+ title = stringResource(R .string.incompatible_patches ),
452+ onHelpClick = { showIncompatiblePatchesDialog = true }
453453 )
454454 }
455455 }
@@ -506,24 +506,24 @@ private fun PatchItem(
506506 onOptionsDialog : () -> Unit ,
507507 selected : Boolean ,
508508 onToggle : () -> Unit ,
509- supported : Boolean = true
509+ compatible : Boolean = true
510510) = ListItem (
511511 modifier = Modifier
512- .let { if (! supported ) it.alpha(0.5f ) else it }
512+ .let { if (! compatible ) it.alpha(0.5f ) else it }
513513 .clickable(onClick = onToggle)
514514 .fillMaxSize(),
515515 leadingContent = {
516516 HapticCheckbox (
517517 checked = selected,
518518 onCheckedChange = { onToggle() },
519- enabled = supported
519+ enabled = compatible
520520 )
521521 },
522522 headlineContent = { Text (patch.name) },
523523 supportingContent = patch.description?.let { { Text (it) } },
524524 trailingContent = {
525525 if (patch.options?.isNotEmpty() == true ) {
526- IconButton (onClick = onOptionsDialog, enabled = supported ) {
526+ IconButton (onClick = onOptionsDialog, enabled = compatible ) {
527527 Icon (Icons .Outlined .Settings , null )
528528 }
529529 }
@@ -559,7 +559,7 @@ fun ListHeader(
559559}
560560
561561@Composable
562- private fun UnsupportedPatchesDialog (
562+ private fun IncompatiblePatchesDialog (
563563 appVersion : String ,
564564 onDismissRequest : () -> Unit
565565) = AlertDialog (
@@ -572,21 +572,21 @@ private fun UnsupportedPatchesDialog(
572572 Text (stringResource(R .string.ok))
573573 }
574574 },
575- title = { Text (stringResource(R .string.unsupported_patches )) },
575+ title = { Text (stringResource(R .string.incompatible_patches )) },
576576 text = {
577577 Text (
578578 stringResource(
579- R .string.unsupported_patches_dialog ,
579+ R .string.incompatible_patches_dialog ,
580580 appVersion
581581 )
582582 )
583583 }
584584)
585585
586586@Composable
587- private fun UnsupportedPatchDialog (
587+ private fun IncompatiblePatchDialog (
588588 appVersion : String ,
589- supportedVersions : List <String >,
589+ compatibleVersions : List <String >,
590590 onDismissRequest : () -> Unit
591591) = AlertDialog (
592592 icon = {
@@ -598,13 +598,13 @@ private fun UnsupportedPatchDialog(
598598 Text (stringResource(R .string.ok))
599599 }
600600 },
601- title = { Text (stringResource(R .string.unsupported_patch )) },
601+ title = { Text (stringResource(R .string.incompatible_patch )) },
602602 text = {
603603 Text (
604604 stringResource(
605- R .string.app_not_supported ,
605+ R .string.app_version_not_compatible ,
606606 appVersion,
607- supportedVersions .joinToString(" , " )
607+ compatibleVersions .joinToString(" , " )
608608 )
609609 )
610610 }
0 commit comments