From 0b30934276d1b1d3f767641aff44eba0bab82185 Mon Sep 17 00:00:00 2001 From: Ushie Date: Fri, 19 Jul 2024 18:48:42 +0300 Subject: [PATCH 01/10] feat: Remove toggling between Local and Remote --- .../ui/component/bundle/BaseBundleDialog.kt | 20 ------------------- 1 file changed, 20 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 2b67860315..c1a81f071f 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 @@ -40,7 +40,6 @@ fun BaseBundleDialog( autoUpdate: Boolean, onAutoUpdateChange: (Boolean) -> Unit, onPatchesClick: () -> Unit, - onBundleTypeClick: () -> Unit = {}, extraFields: @Composable ColumnScope.() -> Unit = {} ) { ColumnWithScrollbar( @@ -125,25 +124,6 @@ fun BaseBundleDialog( ) } - BundleListItem( - headlineText = stringResource(R.string.bundle_type), - supportingText = stringResource(R.string.bundle_type_description), - modifier = Modifier.clickable { - onBundleTypeClick() - } - ) { - FilledTonalButton( - onClick = onBundleTypeClick, - content = { - if (remoteUrl == null) { - Text(stringResource(R.string.local)) - } else { - Text(stringResource(R.string.remote)) - } - } - ) - } - if (version != null || patchCount > 0) { Text( text = stringResource(R.string.information), From e3edfc7ad3aab08964ff466abe17a56196b964f2 Mon Sep 17 00:00:00 2001 From: Ushie Date: Tue, 23 Jul 2024 05:14:23 +0300 Subject: [PATCH 02/10] feat: Initialize redesign --- .../ui/component/bundle/BaseBundleDialog.kt | 145 ++++++++++-------- app/src/main/res/values/strings.xml | 1 + 2 files changed, 81 insertions(+), 65 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 c1a81f071f..394cdd96a0 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 @@ -2,30 +2,26 @@ package app.revanced.manager.ui.component.bundle import android.webkit.URLUtil import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.ColumnScope -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.* import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.automirrored.outlined.ArrowRight -import androidx.compose.material3.FilledTonalButton -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Switch -import androidx.compose.material3.Text +import androidx.compose.material.icons.outlined.Extension +import androidx.compose.material.icons.outlined.Folder +import androidx.compose.material.icons.outlined.Sell +import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import app.revanced.manager.R import app.revanced.manager.ui.component.ColumnWithScrollbar import app.revanced.manager.ui.component.TextInputDialog -import app.revanced.manager.util.isDebuggable @Composable fun BaseBundleDialog( @@ -45,34 +41,18 @@ fun BaseBundleDialog( ColumnWithScrollbar( modifier = Modifier .fillMaxWidth() - .then(modifier) + .padding(horizontal = 24.dp) + .then(modifier), + verticalArrangement = Arrangement.spacedBy(16.dp) ) { if (name != null) { - var showNameInputDialog by rememberSaveable { - mutableStateOf(false) - } - if (showNameInputDialog) { - TextInputDialog( - initial = name, - title = stringResource(R.string.bundle_input_name), - onDismissRequest = { - showNameInputDialog = false - }, - onConfirm = { - showNameInputDialog = false - onNameChange?.invoke(it) - }, - validator = { - it.length in 1..19 - } - ) - } - BundleListItem( - headlineText = stringResource(R.string.bundle_input_name), - supportingText = name.ifEmpty { stringResource(R.string.field_not_set) }, - modifier = Modifier.clickable(enabled = onNameChange != null) { - showNameInputDialog = true - } + OutlinedTextField( + modifier = Modifier.fillMaxWidth(), + label = { Text(stringResource(R.string.bundle_input_name)) }, + value = name, + onValueChange = { + if (it.length in 1..19) onNameChange?.invoke(it) + }, ) } @@ -124,36 +104,71 @@ fun BaseBundleDialog( ) } - if (version != null || patchCount > 0) { - Text( - text = stringResource(R.string.information), - modifier = Modifier.padding( - horizontal = 16.dp, - vertical = 12.dp - ), - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.primary, - ) - } - - val patchesClickable = LocalContext.current.isDebuggable && patchCount > 0 - BundleListItem( - headlineText = stringResource(R.string.patches), - supportingText = pluralStringResource(R.plurals.bundle_patches_available, patchCount, patchCount), - modifier = Modifier.clickable(enabled = patchesClickable, onClick = onPatchesClick) - ) { - if (patchesClickable) - Icon( - Icons.AutoMirrored.Outlined.ArrowRight, - stringResource(R.string.patches) + OutlinedCard { + Column( + modifier = Modifier.padding(16.dp), + verticalArrangement = Arrangement.spacedBy(6.dp) + ) { + Text(stringResource(R.string.bundle_information)) + version?.let { + BundleInfoItem( + text = { Text(it, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant) }, + icon = Icons.Outlined.Sell + ) + } + BundleInfoItem( + text = { + if (remoteUrl == null) { + Text(stringResource(R.string.local), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant) + } else { + Text(stringResource(R.string.remote), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant) + } + }, + icon = Icons.Outlined.Folder ) + patchCount.let { + BundleInfoItem( + text = { + Text( + pluralStringResource( + R.plurals.bundle_patches_available, + it, + it + ), + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.onSurfaceVariant + ) + }, + icon = Icons.Outlined.Extension + ) + } + } } + } +} - version?.let { - BundleListItem( - headlineText = stringResource(R.string.version), - supportingText = it, - ) - } +@Composable +fun BundleInfoItem( + text: @Composable () -> Unit, + icon: ImageVector, +) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(12.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + icon, + contentDescription = null, + modifier = Modifier.size(20.dp), + tint = MaterialTheme.colorScheme.onSurfaceVariant + ) + text() } } \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 36cbea3aa8..b74b04f2d3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -367,4 +367,5 @@ Add patch bundle Bundle URL Auto update + Bundle information From 618d0618a2c3da0ad0f5eada922573d31d283055 Mon Sep 17 00:00:00 2001 From: Ushie Date: Mon, 5 Aug 2024 23:40:33 +0300 Subject: [PATCH 03/10] feat: More design changes --- .../ui/component/bundle/BaseBundleDialog.kt | 163 +++++++++--------- 1 file changed, 79 insertions(+), 84 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 394cdd96a0..5b635bfe1c 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 @@ -5,7 +5,7 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Extension -import androidx.compose.material.icons.outlined.Folder +import androidx.compose.material.icons.outlined.Inventory2 import androidx.compose.material.icons.outlined.Sell import androidx.compose.material3.* import androidx.compose.runtime.Composable @@ -16,8 +16,8 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import app.revanced.manager.R import app.revanced.manager.ui.component.ColumnWithScrollbar @@ -41,18 +41,61 @@ fun BaseBundleDialog( ColumnWithScrollbar( modifier = Modifier .fillMaxWidth() - .padding(horizontal = 24.dp) .then(modifier), - verticalArrangement = Arrangement.spacedBy(16.dp) ) { - if (name != null) { - OutlinedTextField( + Column( + modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp) + ) { + Row( modifier = Modifier.fillMaxWidth(), - label = { Text(stringResource(R.string.bundle_input_name)) }, - value = name, - onValueChange = { - if (it.length in 1..19) onNameChange?.invoke(it) + horizontalArrangement = Arrangement.spacedBy(8.dp, Alignment.Start), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = Icons.Outlined.Inventory2, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(32.dp) + ) + name?.let { + Text( + it, + style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight(800)), + color = MaterialTheme.colorScheme.primary, + ) + } + } + Row( + horizontalArrangement = Arrangement.spacedBy(16.dp), + modifier = Modifier + .fillMaxWidth() + .padding(start = 2.dp) + ) { + version?.let { + Tag( + Icons.Outlined.Sell, it + ) + } + Tag( + Icons.Outlined.Extension, patchCount.toString() + ) + } + } + HorizontalDivider( + modifier = Modifier.padding(horizontal = 16.dp), color = MaterialTheme.colorScheme.outlineVariant + ) + + if (remoteUrl != null) { + BundleListItem(headlineText = stringResource(R.string.bundle_auto_update), + supportingText = stringResource(R.string.bundle_auto_update_description), + trailingContent = { + Switch( + checked = autoUpdate, onCheckedChange = onAutoUpdateChange + ) }, + modifier = Modifier.clickable { + onAutoUpdateChange(!autoUpdate) + } ) } @@ -61,8 +104,7 @@ fun BaseBundleDialog( mutableStateOf(false) } if (showUrlInputDialog) { - TextInputDialog( - initial = url, + TextInputDialog(initial = url, title = stringResource(R.string.bundle_input_source_url), onDismissRequest = { showUrlInputDialog = false }, onConfirm = { @@ -73,83 +115,17 @@ fun BaseBundleDialog( if (it.isEmpty()) return@TextInputDialog false URLUtil.isValidUrl(it) - } - ) + }) } - BundleListItem( - modifier = Modifier.clickable(enabled = onRemoteUrlChange != null) { - showUrlInputDialog = true - }, - headlineText = stringResource(R.string.bundle_input_source_url), - supportingText = url.ifEmpty { stringResource(R.string.field_not_set) } - ) + BundleListItem(modifier = Modifier.clickable(enabled = onRemoteUrlChange != null) { + showUrlInputDialog = true + }, headlineText = stringResource(R.string.bundle_input_source_url), supportingText = url.ifEmpty { + stringResource(R.string.field_not_set) + }) } extraFields() - - if (remoteUrl != null) { - BundleListItem( - headlineText = stringResource(R.string.bundle_auto_update), - supportingText = stringResource(R.string.bundle_auto_update_description), - trailingContent = { - Switch( - checked = autoUpdate, - onCheckedChange = onAutoUpdateChange - ) - }, - modifier = Modifier.clickable { - onAutoUpdateChange(!autoUpdate) - } - ) - } - - OutlinedCard { - Column( - modifier = Modifier.padding(16.dp), - verticalArrangement = Arrangement.spacedBy(6.dp) - ) { - Text(stringResource(R.string.bundle_information)) - version?.let { - BundleInfoItem( - text = { Text(it, - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant) }, - icon = Icons.Outlined.Sell - ) - } - BundleInfoItem( - text = { - if (remoteUrl == null) { - Text(stringResource(R.string.local), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant) - } else { - Text(stringResource(R.string.remote), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant) - } - }, - icon = Icons.Outlined.Folder - ) - patchCount.let { - BundleInfoItem( - text = { - Text( - pluralStringResource( - R.plurals.bundle_patches_available, - it, - it - ), - style = MaterialTheme.typography.bodyMedium, - color = MaterialTheme.colorScheme.onSurfaceVariant - ) - }, - icon = Icons.Outlined.Extension - ) - } - } - } } } @@ -171,4 +147,23 @@ fun BundleInfoItem( ) text() } +} + +@Composable +private fun Tag(icon: ImageVector, text: String) { + Row( + horizontalArrangement = Arrangement.spacedBy(6.dp), verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = icon, + contentDescription = null, + modifier = Modifier.size(16.dp), + tint = MaterialTheme.colorScheme.outline, + ) + Text( + text, + style = MaterialTheme.typography.bodyMedium, + color = MaterialTheme.colorScheme.outline, + ) + } } \ No newline at end of file From 4d6e930b74838a672f5c21bf5d17d9e024b81185 Mon Sep 17 00:00:00 2001 From: Ushie Date: Tue, 6 Aug 2024 03:44:52 +0300 Subject: [PATCH 04/10] feat: Add view patches button and correct top bar title --- .../ui/component/bundle/BaseBundleDialog.kt | 20 ++++++++++++++++++- .../bundle/BundleInformationDialog.kt | 16 +++------------ app/src/main/res/values/strings.xml | 1 + 3 files changed, 23 insertions(+), 14 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 5b635bfe1c..bf32a308a6 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 @@ -4,6 +4,7 @@ import android.webkit.URLUtil import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.outlined.ArrowRight import androidx.compose.material.icons.outlined.Extension import androidx.compose.material.icons.outlined.Inventory2 import androidx.compose.material.icons.outlined.Sell @@ -28,7 +29,6 @@ fun BaseBundleDialog( modifier: Modifier = Modifier, isDefault: Boolean, name: String?, - onNameChange: ((String) -> Unit)? = null, remoteUrl: String?, onRemoteUrlChange: ((String) -> Unit)? = null, patchCount: Int, @@ -81,6 +81,7 @@ fun BaseBundleDialog( ) } } + HorizontalDivider( modifier = Modifier.padding(horizontal = 16.dp), color = MaterialTheme.colorScheme.outlineVariant ) @@ -125,6 +126,23 @@ fun BaseBundleDialog( }) } + val patchesClickable = patchCount > 0 + BundleListItem( + headlineText = stringResource(R.string.patches), + supportingText = stringResource(R.string.view_patches), + modifier = Modifier.clickable( + enabled = patchesClickable, + onClick = onPatchesClick + ) + ) { + if (patchesClickable) { + Icon( + Icons.AutoMirrored.Outlined.ArrowRight, + stringResource(R.string.patches) + ) + } + } + extraFields() } } diff --git a/app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt b/app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt index 9a9573a5b9..f5919ced6e 100644 --- a/app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt +++ b/app/src/main/java/app/revanced/manager/ui/component/bundle/BundleInformationDialog.kt @@ -11,18 +11,9 @@ import androidx.compose.material.icons.automirrored.outlined.ArrowRight import androidx.compose.material.icons.outlined.DeleteOutline import androidx.compose.material.icons.outlined.Share import androidx.compose.material.icons.outlined.Update -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope +import androidx.compose.material3.* +import androidx.compose.runtime.* import androidx.compose.runtime.saveable.rememberSaveable -import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource @@ -78,7 +69,7 @@ fun BundleInformationDialog( Scaffold( topBar = { BundleTopBar( - title = bundleName, + title = stringResource(R.string.patch_bundle_field), onBackClick = onDismissRequest, backIcon = { Icon( @@ -111,7 +102,6 @@ fun BundleInformationDialog( modifier = Modifier.padding(paddingValues), isDefault = bundle.isDefault, name = bundleName, - onNameChange = { composableScope.launch { bundle.setName(it) } }, remoteUrl = bundle.asRemoteOrNull?.endpoint, patchCount = patchCount, version = props?.versionInfo?.patches, diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0166daeeb3..73bc2e1725 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -373,4 +373,5 @@ Show update message on launch Shows a popup notification whenever there is a new update available on launch. Bundle information + View patches From 8088e3f2c1eb0fabce530531cca4433c5277973f Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 8 Aug 2024 02:10:48 +0300 Subject: [PATCH 05/10] refactor: Remove unused plural --- app/src/main/res/values/plurals.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/main/res/values/plurals.xml b/app/src/main/res/values/plurals.xml index 9bcfcc0804..d017807383 100644 --- a/app/src/main/res/values/plurals.xml +++ b/app/src/main/res/values/plurals.xml @@ -11,8 +11,4 @@ %d selected - - %d patch available - %d patches available - \ No newline at end of file From 809a1ea9999b33900e1827c70f9dd87680a0c48e Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 8 Aug 2024 02:15:59 +0300 Subject: [PATCH 06/10] refactor: Consistent formatting --- .../ui/component/bundle/BaseBundleDialog.kt | 44 +++++++++++++------ 1 file changed, 30 insertions(+), 14 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 bf32a308a6..18414eeb31 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 @@ -44,7 +44,8 @@ fun BaseBundleDialog( .then(modifier), ) { Column( - modifier = Modifier.padding(16.dp), verticalArrangement = Arrangement.spacedBy(4.dp) + modifier = Modifier.padding(16.dp), + verticalArrangement = Arrangement.spacedBy(4.dp) ) { Row( modifier = Modifier.fillMaxWidth(), @@ -59,7 +60,7 @@ fun BaseBundleDialog( ) name?.let { Text( - it, + text = it, style = MaterialTheme.typography.titleLarge.copy(fontWeight = FontWeight(800)), color = MaterialTheme.colorScheme.primary, ) @@ -83,11 +84,13 @@ fun BaseBundleDialog( } HorizontalDivider( - modifier = Modifier.padding(horizontal = 16.dp), color = MaterialTheme.colorScheme.outlineVariant + modifier = Modifier.padding(horizontal = 16.dp), + color = MaterialTheme.colorScheme.outlineVariant ) if (remoteUrl != null) { - BundleListItem(headlineText = stringResource(R.string.bundle_auto_update), + BundleListItem( + headlineText = stringResource(R.string.bundle_auto_update), supportingText = stringResource(R.string.bundle_auto_update_description), trailingContent = { Switch( @@ -105,7 +108,8 @@ fun BaseBundleDialog( mutableStateOf(false) } if (showUrlInputDialog) { - TextInputDialog(initial = url, + TextInputDialog( + initial = url, title = stringResource(R.string.bundle_input_source_url), onDismissRequest = { showUrlInputDialog = false }, onConfirm = { @@ -116,20 +120,28 @@ fun BaseBundleDialog( if (it.isEmpty()) return@TextInputDialog false URLUtil.isValidUrl(it) - }) + } + ) } - BundleListItem(modifier = Modifier.clickable(enabled = onRemoteUrlChange != null) { - showUrlInputDialog = true - }, headlineText = stringResource(R.string.bundle_input_source_url), supportingText = url.ifEmpty { - stringResource(R.string.field_not_set) - }) + BundleListItem( + modifier = Modifier.clickable( + enabled = onRemoteUrlChange != null, + onClick = { + showUrlInputDialog = true + } + ), + headlineText = stringResource(R.string.bundle_input_source_url), + supportingText = url.ifEmpty { + stringResource(R.string.field_not_set) + } + ) } val patchesClickable = patchCount > 0 BundleListItem( headlineText = stringResource(R.string.patches), - supportingText = stringResource(R.string.view_patches), + supportingText = stringResource(R.string.bundle_view_patches), modifier = Modifier.clickable( enabled = patchesClickable, onClick = onPatchesClick @@ -168,9 +180,13 @@ fun BundleInfoItem( } @Composable -private fun Tag(icon: ImageVector, text: String) { +private fun Tag( + icon: ImageVector, + text: String +) { Row( - horizontalArrangement = Arrangement.spacedBy(6.dp), verticalAlignment = Alignment.CenterVertically + horizontalArrangement = Arrangement.spacedBy(6.dp), + verticalAlignment = Alignment.CenterVertically ) { Icon( imageVector = icon, From f3d363a317e80748afa52d2a29ae924f25a7cc3e Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 8 Aug 2024 02:16:18 +0300 Subject: [PATCH 07/10] refactor: Move and name string appropiately --- app/src/main/res/values/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 73bc2e1725..0111c4fd0d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -308,6 +308,7 @@ Automatically update this bundle when ReVanced starts Bundle type Choose the type of bundle you want + View patches About ReVanced Manager ReVanced Manager is an application designed to work with ReVanced Patcher, which allows for long-lasting patches to be created for Android apps. The patching system is designed to automatically work with new versions of apps with minimal maintenance. An update is available @@ -372,6 +373,4 @@ Never show again Show update message on launch Shows a popup notification whenever there is a new update available on launch. - Bundle information - View patches From a7c605b0a4761409cb9cf97d9a2ddaa3ce88b18a Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 8 Aug 2024 02:16:31 +0300 Subject: [PATCH 08/10] refactor: Remove unused composable --- .../ui/component/bundle/BaseBundleDialog.kt | 20 ------------------- 1 file changed, 20 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 18414eeb31..8266ac9ed6 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,26 +159,6 @@ fun BaseBundleDialog( } } -@Composable -fun BundleInfoItem( - text: @Composable () -> Unit, - icon: ImageVector, -) { - Row( - modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(12.dp), - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - icon, - contentDescription = null, - modifier = Modifier.size(20.dp), - tint = MaterialTheme.colorScheme.onSurfaceVariant - ) - text() - } -} - @Composable private fun Tag( icon: ImageVector, From dc6f965a355a0eab4fe60aeb345d2acd1b670eb7 Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 15 Aug 2024 17:47:44 +0300 Subject: [PATCH 09/10] refactor: Formatting changes --- .../manager/ui/component/bundle/BaseBundleDialog.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 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 8266ac9ed6..4450ef5cdd 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 @@ -73,13 +73,9 @@ fun BaseBundleDialog( .padding(start = 2.dp) ) { version?.let { - Tag( - Icons.Outlined.Sell, it - ) + Tag(Icons.Outlined.Sell, it) } - Tag( - Icons.Outlined.Extension, patchCount.toString() - ) + Tag(Icons.Outlined.Extension, patchCount.toString()) } } @@ -94,7 +90,8 @@ fun BaseBundleDialog( supportingText = stringResource(R.string.bundle_auto_update_description), trailingContent = { Switch( - checked = autoUpdate, onCheckedChange = onAutoUpdateChange + checked = autoUpdate, + onCheckedChange = onAutoUpdateChange ) }, modifier = Modifier.clickable { From 8cdf9b13268bfab9e5e7a95083a03dab7e75d518 Mon Sep 17 00:00:00 2001 From: Ushie Date: Thu, 15 Aug 2024 17:48:09 +0300 Subject: [PATCH 10/10] chore: Remove unused strings --- app/src/main/res/values/strings.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0111c4fd0d..5b5b13ea30 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -143,7 +143,6 @@ Close System Light - Information Dark Appearance Downloaded apps @@ -179,8 +178,6 @@ Patch bundles Delete Refresh - Remote - Local Continue anyways Download another version Download app @@ -300,14 +297,11 @@ Help us improve this application Developer options Options for debugging issues - Name Source URL Successfully updated %s No update available for %s Auto update Automatically update this bundle when ReVanced starts - Bundle type - Choose the type of bundle you want View patches About ReVanced Manager ReVanced Manager is an application designed to work with ReVanced Patcher, which allows for long-lasting patches to be created for Android apps. The patching system is designed to automatically work with new versions of apps with minimal maintenance.