mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat: disable filter chips when there are no patches
This commit is contained in:
parent
955e7a4f1c
commit
5d3b963682
@ -162,21 +162,24 @@ fun PatchesSelectorScreen(
|
||||
horizontalArrangement = Arrangement.spacedBy(5.dp)
|
||||
) {
|
||||
FilterChip(
|
||||
selected = vm.filter and SHOW_SUPPORTED != 0,
|
||||
selected = vm.filter and SHOW_SUPPORTED != 0 && bundle.supported.isNotEmpty(),
|
||||
onClick = { vm.toggleFlag(SHOW_SUPPORTED) },
|
||||
label = { Text(stringResource(R.string.supported)) }
|
||||
label = { Text(stringResource(R.string.supported)) },
|
||||
enabled = bundle.supported.isNotEmpty()
|
||||
)
|
||||
|
||||
FilterChip(
|
||||
selected = vm.filter and SHOW_UNIVERSAL != 0,
|
||||
selected = vm.filter and SHOW_UNIVERSAL != 0 && bundle.universal.isNotEmpty(),
|
||||
onClick = { vm.toggleFlag(SHOW_UNIVERSAL) },
|
||||
label = { Text(stringResource(R.string.universal)) }
|
||||
label = { Text(stringResource(R.string.universal)) },
|
||||
enabled = bundle.universal.isNotEmpty()
|
||||
)
|
||||
|
||||
FilterChip(
|
||||
selected = vm.filter and SHOW_UNSUPPORTED != 0,
|
||||
selected = vm.filter and SHOW_UNSUPPORTED != 0 && bundle.unsupported.isNotEmpty(),
|
||||
onClick = { vm.toggleFlag(SHOW_UNSUPPORTED) },
|
||||
label = { Text(stringResource(R.string.unsupported)) }
|
||||
label = { Text(stringResource(R.string.unsupported)) },
|
||||
enabled = bundle.unsupported.isNotEmpty()
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user