@@ -76,8 +76,8 @@ import app.revanced.manager.ui.component.haptics.HapticExtendedFloatingActionBut
76
76
import app.revanced.manager.ui.component.haptics.HapticTab
77
77
import app.revanced.manager.ui.component.patches.OptionItem
78
78
import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel
79
+ import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_INCOMPATIBLE
79
80
import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_UNIVERSAL
80
- import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel.Companion.SHOW_UNSUPPORTED
81
81
import app.revanced.manager.util.Options
82
82
import app.revanced.manager.util.PatchSelection
83
83
import app.revanced.manager.util.isScrollingUp
@@ -147,9 +147,9 @@ fun PatchesSelectorScreen(
147
147
verticalArrangement = Arrangement .spacedBy(12 .dp)
148
148
) {
149
149
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 )) }
153
153
)
154
154
155
155
CheckedFilterChip (
@@ -163,18 +163,18 @@ fun PatchesSelectorScreen(
163
163
}
164
164
165
165
if (vm.compatibleVersions.isNotEmpty())
166
- UnsupportedPatchDialog (
166
+ IncompatiblePatchDialog (
167
167
appVersion = vm.appVersion ? : stringResource(R .string.any_version),
168
- supportedVersions = vm.compatibleVersions,
168
+ compatibleVersions = vm.compatibleVersions,
169
169
onDismissRequest = vm::dismissDialogs
170
170
)
171
- var showUnsupportedPatchesDialog by rememberSaveable {
171
+ var showIncompatiblePatchesDialog by rememberSaveable {
172
172
mutableStateOf(false )
173
173
}
174
- if (showUnsupportedPatchesDialog )
175
- UnsupportedPatchesDialog (
174
+ if (showIncompatiblePatchesDialog )
175
+ IncompatiblePatchesDialog (
176
176
appVersion = vm.appVersion ? : stringResource(R .string.any_version),
177
- onDismissRequest = { showUnsupportedPatchesDialog = false }
177
+ onDismissRequest = { showIncompatiblePatchesDialog = false }
178
178
)
179
179
180
180
vm.optionsDialog?.let { (bundle, patch) ->
@@ -204,7 +204,7 @@ fun PatchesSelectorScreen(
204
204
uid : Int ,
205
205
patches : List <PatchInfo >,
206
206
visible : Boolean ,
207
- supported : Boolean ,
207
+ compatible : Boolean ,
208
208
header : (@Composable () -> Unit )? = null
209
209
) {
210
210
if (patches.isNotEmpty() && visible) {
@@ -224,14 +224,14 @@ fun PatchesSelectorScreen(
224
224
onOptionsDialog = {
225
225
vm.optionsDialog = uid to patch
226
226
},
227
- selected = supported && vm.isSelected(
227
+ selected = compatible && vm.isSelected(
228
228
uid,
229
229
patch
230
230
),
231
231
onToggle = {
232
232
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)
235
235
236
236
// Show selection warning if enabled
237
237
vm.selectionWarningEnabled -> showSelectionWarning = true
@@ -245,7 +245,7 @@ fun PatchesSelectorScreen(
245
245
else -> vm.togglePatch(uid, patch)
246
246
}
247
247
},
248
- supported = supported
248
+ compatible = compatible
249
249
)
250
250
}
251
251
}
@@ -321,15 +321,15 @@ fun PatchesSelectorScreen(
321
321
322
322
patchList(
323
323
uid = bundle.uid,
324
- patches = bundle.supported .searched(),
324
+ patches = bundle.compatible .searched(),
325
325
visible = true ,
326
- supported = true
326
+ compatible = true
327
327
)
328
328
patchList(
329
329
uid = bundle.uid,
330
330
patches = bundle.universal.searched(),
331
331
visible = vm.filter and SHOW_UNIVERSAL != 0 ,
332
- supported = true
332
+ compatible = true
333
333
) {
334
334
ListHeader (
335
335
title = stringResource(R .string.universal_patches),
@@ -338,13 +338,13 @@ fun PatchesSelectorScreen(
338
338
339
339
patchList(
340
340
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
344
344
) {
345
345
ListHeader (
346
- title = stringResource(R .string.unsupported_patches ),
347
- onHelpClick = { showUnsupportedPatchesDialog = true }
346
+ title = stringResource(R .string.incompatible_patches ),
347
+ onHelpClick = { showIncompatiblePatchesDialog = true }
348
348
)
349
349
}
350
350
}
@@ -427,29 +427,29 @@ fun PatchesSelectorScreen(
427
427
) {
428
428
patchList(
429
429
uid = bundle.uid,
430
- patches = bundle.supported ,
430
+ patches = bundle.compatible ,
431
431
visible = true ,
432
- supported = true
432
+ compatible = true
433
433
)
434
434
patchList(
435
435
uid = bundle.uid,
436
436
patches = bundle.universal,
437
437
visible = vm.filter and SHOW_UNIVERSAL != 0 ,
438
- supported = true
438
+ compatible = true
439
439
) {
440
440
ListHeader (
441
441
title = stringResource(R .string.universal_patches),
442
442
)
443
443
}
444
444
patchList(
445
445
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
449
449
) {
450
450
ListHeader (
451
- title = stringResource(R .string.unsupported_patches ),
452
- onHelpClick = { showUnsupportedPatchesDialog = true }
451
+ title = stringResource(R .string.incompatible_patches ),
452
+ onHelpClick = { showIncompatiblePatchesDialog = true }
453
453
)
454
454
}
455
455
}
@@ -506,24 +506,24 @@ private fun PatchItem(
506
506
onOptionsDialog : () -> Unit ,
507
507
selected : Boolean ,
508
508
onToggle : () -> Unit ,
509
- supported : Boolean = true
509
+ compatible : Boolean = true
510
510
) = ListItem (
511
511
modifier = Modifier
512
- .let { if (! supported ) it.alpha(0.5f ) else it }
512
+ .let { if (! compatible ) it.alpha(0.5f ) else it }
513
513
.clickable(onClick = onToggle)
514
514
.fillMaxSize(),
515
515
leadingContent = {
516
516
HapticCheckbox (
517
517
checked = selected,
518
518
onCheckedChange = { onToggle() },
519
- enabled = supported
519
+ enabled = compatible
520
520
)
521
521
},
522
522
headlineContent = { Text (patch.name) },
523
523
supportingContent = patch.description?.let { { Text (it) } },
524
524
trailingContent = {
525
525
if (patch.options?.isNotEmpty() == true ) {
526
- IconButton (onClick = onOptionsDialog, enabled = supported ) {
526
+ IconButton (onClick = onOptionsDialog, enabled = compatible ) {
527
527
Icon (Icons .Outlined .Settings , null )
528
528
}
529
529
}
@@ -559,7 +559,7 @@ fun ListHeader(
559
559
}
560
560
561
561
@Composable
562
- private fun UnsupportedPatchesDialog (
562
+ private fun IncompatiblePatchesDialog (
563
563
appVersion : String ,
564
564
onDismissRequest : () -> Unit
565
565
) = AlertDialog (
@@ -572,21 +572,21 @@ private fun UnsupportedPatchesDialog(
572
572
Text (stringResource(R .string.ok))
573
573
}
574
574
},
575
- title = { Text (stringResource(R .string.unsupported_patches )) },
575
+ title = { Text (stringResource(R .string.incompatible_patches )) },
576
576
text = {
577
577
Text (
578
578
stringResource(
579
- R .string.unsupported_patches_dialog ,
579
+ R .string.incompatible_patches_dialog ,
580
580
appVersion
581
581
)
582
582
)
583
583
}
584
584
)
585
585
586
586
@Composable
587
- private fun UnsupportedPatchDialog (
587
+ private fun IncompatiblePatchDialog (
588
588
appVersion : String ,
589
- supportedVersions : List <String >,
589
+ compatibleVersions : List <String >,
590
590
onDismissRequest : () -> Unit
591
591
) = AlertDialog (
592
592
icon = {
@@ -598,13 +598,13 @@ private fun UnsupportedPatchDialog(
598
598
Text (stringResource(R .string.ok))
599
599
}
600
600
},
601
- title = { Text (stringResource(R .string.unsupported_patch )) },
601
+ title = { Text (stringResource(R .string.incompatible_patch )) },
602
602
text = {
603
603
Text (
604
604
stringResource(
605
- R .string.app_not_supported ,
605
+ R .string.app_version_not_compatible ,
606
606
appVersion,
607
- supportedVersions .joinToString(" , " )
607
+ compatibleVersions .joinToString(" , " )
608
608
)
609
609
)
610
610
}
0 commit comments