From e0f8d06152e9683a0709f8d826a4d2a3a4fe60d2 Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:13:25 -0700 Subject: [PATCH] fix(ui): make entire patches view button selectable (#1271) --- .../ui/component/bundle/BaseBundleDialog.kt | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt b/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt index 042449d2..385c2269 100644 --- a/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt +++ b/app/src/main/java/app/revanced/manager/ui/component/bundle/BaseBundleDialog.kt @@ -159,22 +159,20 @@ fun BaseBundleDialog( ) } - if (patchCount > 0) { - BundleListItem( - headlineText = stringResource(R.string.patches), - supportingText = if (patchCount == 0) stringResource(R.string.no_patches) - else stringResource(R.string.patches_available, patchCount), - trailingContent = { - if (patchCount > 0) { - IconButton(onClick = onPatchesClick) { - Icon( - Icons.Outlined.ArrowRight, - stringResource(R.string.patches) - ) - } - } - } - ) + BundleListItem( + headlineText = stringResource(R.string.patches), + supportingText = if (patchCount == 0) stringResource(R.string.no_patches) + else stringResource(R.string.patches_available, patchCount), + modifier = Modifier.clickable(enabled = patchCount > 0) { + onPatchesClick() + } + ) { + if (patchCount > 0) { + Icon( + Icons.Outlined.ArrowRight, + stringResource(R.string.patches) + ) + } } version?.let {