Skip to content

Commit

Permalink
Merge branch 'ReVanced:compose-dev' into compose-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
n-34 authored Dec 27, 2023
2 parents c65957c + 4fdd6bb commit 574bec4
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 49 deletions.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ android {

buildFeatures.compose = true
buildFeatures.aidl = true
buildFeatures.buildConfig=true

composeOptions.kotlinCompilerExtensionVersion = "1.5.3"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package app.revanced.manager.ui.component
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -38,7 +38,7 @@ fun AppTopBar(
onBackClick: (() -> Unit)? = null,
backIcon: @Composable (() -> Unit) = @Composable {
Icon(
imageVector = Icons.Default.ArrowBack, contentDescription = stringResource(
imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(
R.string.back
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.compose.material.icons.outlined.Source
import androidx.compose.material.icons.outlined.Update
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Checkbox
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -69,7 +69,7 @@ fun AutoUpdatesDialog(onSubmit: (Boolean, Boolean) -> Unit) {
checked = managerEnabled,
onCheckedChange = { managerEnabled = it }
)
Divider()
HorizontalDivider()
AutoUpdatesItem(
headline = R.string.auto_updates_dialog_patches,
icon = Icons.Outlined.Source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ fun LoadingIndicator(

progress?.let {
CircularProgressIndicator(
progress = progress,
modifier = Modifier.padding(vertical = 16.dp).then(modifier)
progress = { progress },
modifier = Modifier.padding(vertical = 16.dp).then(modifier),
)
} ?:
CircularProgressIndicator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowRight
import androidx.compose.material.icons.automirrored.outlined.ArrowRight
import androidx.compose.material3.FilledTonalButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Switch
import androidx.compose.material3.Text
Expand Down Expand Up @@ -170,7 +169,7 @@ fun BaseBundleDialog(
) {
if (patchesClickable)
Icon(
Icons.Outlined.ArrowRight,
Icons.AutoMirrored.Outlined.ArrowRight,
stringResource(R.string.patches)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package app.revanced.manager.ui.component.bundle

import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.outlined.DeleteOutline
import androidx.compose.material.icons.outlined.Refresh
import androidx.compose.material3.ExperimentalMaterial3Api
Expand Down Expand Up @@ -71,7 +71,7 @@ fun BundleInformationDialog(
onBackClick = onDismissRequest,
onBackIcon = {
Icon(
imageVector = Icons.Default.ArrowBack,
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(R.string.back)
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.outlined.Close
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.outlined.Lightbulb
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -54,7 +52,7 @@ fun BundlePatchesDialog(
onBackClick = onDismissRequest,
onBackIcon = {
Icon(
imageVector = Icons.Default.ArrowBack,
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = stringResource(R.string.back)
)
},
Expand Down Expand Up @@ -98,7 +96,7 @@ fun BundlePatchesDialog(
}
}
)
Divider()
HorizontalDivider()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
import androidx.compose.material.icons.automirrored.outlined.InsertDriveFile
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.outlined.ArrowBack
import androidx.compose.material.icons.outlined.DocumentScanner
import androidx.compose.material.icons.outlined.Folder
import androidx.compose.material.icons.outlined.InsertDriveFile
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -86,7 +85,7 @@ fun PathSelectorDialog(root: Path, onSelect: (Path?) -> Unit) {
item(key = "parent") {
PathItem(
onClick = { currentDirectory = currentDirectory.parent },
icon = Icons.Outlined.ArrowBack,
icon = Icons.AutoMirrored.Outlined.ArrowBack,
name = stringResource(R.string.path_selector_parent_dir)
)
}
Expand All @@ -113,7 +112,7 @@ fun PathSelectorDialog(root: Path, onSelect: (Path?) -> Unit) {
items(files, key = { it.absolutePathString() }) {
PathItem(
onClick = { onSelect(it) },
icon = Icons.Outlined.InsertDriveFile,
icon = Icons.AutoMirrored.Outlined.InsertDriveFile,
name = it.name
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Storage
import androidx.compose.material.icons.outlined.Search
import androidx.compose.material3.*
Expand Down Expand Up @@ -82,7 +82,7 @@ fun AppSelectorScreen(
leadingIcon = {
IconButton({ search = false }) {
Icon(
Icons.Default.ArrowBack,
Icons.AutoMirrored.Filled.ArrowBack,
stringResource(R.string.back)
)
}
Expand Down Expand Up @@ -185,7 +185,7 @@ fun AppSelectorScreen(
Text(stringResource(R.string.select_from_storage_description))
}
)
Divider()
HorizontalDivider()
}

if (appList.isNotEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowRight
import androidx.compose.material.icons.automirrored.filled.ArrowRight
import androidx.compose.material.icons.automirrored.outlined.OpenInNew
import androidx.compose.material.icons.outlined.Circle
import androidx.compose.material.icons.outlined.Delete
import androidx.compose.material.icons.outlined.OpenInNew
import androidx.compose.material.icons.outlined.SettingsBackupRestore
import androidx.compose.material.icons.outlined.Update
import androidx.compose.material3.AlertDialog
Expand Down Expand Up @@ -98,7 +98,7 @@ fun InstalledAppInfoScreen(
.clip(RoundedCornerShape(24.dp))
) {
SegmentedButton(
icon = Icons.Outlined.OpenInNew,
icon = Icons.AutoMirrored.Outlined.OpenInNew,
text = stringResource(R.string.open_app),
onClick = viewModel::launch
)
Expand Down Expand Up @@ -154,7 +154,7 @@ fun InstalledAppInfoScreen(
it
)
},
trailingContent = { Icon(Icons.Filled.ArrowRight, contentDescription = stringResource(R.string.view_applied_patches)) }
trailingContent = { Icon(Icons.AutoMirrored.Filled.ArrowRight, contentDescription = stringResource(R.string.view_applied_patches)) }
)

SettingsListItem(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,15 @@ fun StepIcon(status: State, downloadProgress: Pair<Float, Float>? = null, size:
State.WAITING ->
downloadProgress?.let { (downloaded, total) ->
CircularProgressIndicator(
progress = downloaded / total,
strokeWidth = strokeWidth,
progress = { downloaded / total },
modifier = stringResource(R.string.step_running).let { description ->
Modifier
.size(size)
.semantics {
contentDescription = description
}
}
},
strokeWidth = strokeWidth,
)
} ?: CircularProgressIndicator(
strokeWidth = strokeWidth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.automirrored.outlined.HelpOutline
import androidx.compose.material.icons.outlined.FilterList
import androidx.compose.material.icons.outlined.HelpOutline
import androidx.compose.material.icons.outlined.Restore
import androidx.compose.material.icons.outlined.Save
import androidx.compose.material.icons.outlined.Search
Expand Down Expand Up @@ -225,7 +225,7 @@ fun PatchesSelectorScreen(
leadingIcon = {
IconButton(onClick = { search = null }) {
Icon(
Icons.Default.ArrowBack,
Icons.AutoMirrored.Filled.ArrowBack,
stringResource(R.string.back)
)
}
Expand Down Expand Up @@ -502,7 +502,7 @@ fun ListHeader(
{
IconButton(onClick = it) {
Icon(
Icons.Outlined.HelpOutline,
Icons.AutoMirrored.Outlined.HelpOutline,
stringResource(R.string.help)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.ArrowRight
import androidx.compose.material.icons.automirrored.outlined.ArrowRight
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
Expand Down Expand Up @@ -223,7 +223,7 @@ private fun PageItem(@StringRes title: Int, description: String, onClick: () ->
)
},
trailingContent = {
Icon(Icons.Outlined.ArrowRight, null)
Icon(Icons.AutoMirrored.Outlined.ArrowRight, null)
}
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
Expand Down Expand Up @@ -87,7 +87,7 @@ fun ChangelogItem(
publishDate = changelog.publishDate.relativeTime(LocalContext.current)
)
if (changelog != lastChangelog) {
Divider(
HorizontalDivider(
modifier = Modifier.padding(top = 32.dp),
color = MaterialTheme.colorScheme.outlineVariant
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Update
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Divider
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -81,7 +81,7 @@ fun UpdateScreen(
DownloadData(vm.downloadProgress, vm.downloadedSize, vm.totalSize)
)
vm.changelog?.let { changelog ->
Divider()
HorizontalDivider()
Changelog(changelog)
} ?: Spacer(modifier = Modifier.weight(1f))
Buttons(vm.state, vm::downloadUpdate, vm::installUpdate, onBackClick)
Expand Down Expand Up @@ -147,8 +147,8 @@ private fun Header(state: State, changelog: Changelog?, downloadData: DownloadDa
}
} else if (state == State.DOWNLOADING) {
LinearProgressIndicator(
progress = downloadData.downloadProgress,
modifier = Modifier.fillMaxWidth()
progress = { downloadData.downloadProgress },
modifier = Modifier.fillMaxWidth(),
)
Text(
text =
Expand Down
1 change: 0 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ kotlin.code.style=official
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
ktx = "1.12.0"
viewmodel-lifecycle = "2.6.2"
splash-screen = "1.0.1"
compose-activity = "1.8.0"
compose-activity = "1.8.2"
paging = "3.2.1"
preferences-datastore = "1.0.0"
work-runtime = "2.8.1"
compose-bom = "2023.10.00"
compose-bom = "2023.10.01"
accompanist = "0.30.1"
serialization = "1.6.0"
collection = "0.3.5"
Expand All @@ -19,7 +19,7 @@ reimagined-navigation = "1.5.0"
ktor = "2.3.3"
markdown-renderer = "0.8.0"
fading-edges = "1.0.4"
androidGradlePlugin = "8.1.2"
androidGradlePlugin = "8.2.0"
kotlinGradlePlugin = "1.9.10"
devToolsGradlePlugin = "1.9.10-1.0.13"
aboutLibrariesGradlePlugin = "10.8.3"
Expand All @@ -44,7 +44,7 @@ compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref =
compose-ui = { group = "androidx.compose.ui", name = "ui" }
compose-ui-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" }
compose-livedata = { group = "androidx.compose.runtime", name = "runtime-livedata" }
compose-material3 = { group = "androidx.compose.material3", name = "material3", version = "1.2.0-alpha10"}
compose-material3 = { group = "androidx.compose.material3", name = "material3", version = "1.2.0-beta01"}
compose-material-icons-extended = { group = "androidx.compose.material", name = "material-icons-extended" }

# Coil
Expand Down

0 comments on commit 574bec4

Please sign in to comment.