Skip to content

Commit

Permalink
feat: upgrade compose version and remove the appcompat lib
Browse files Browse the repository at this point in the history
  • Loading branch information
huhx committed Feb 23, 2024
1 parent ad99d8c commit daa0bac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 29 deletions.
3 changes: 1 addition & 2 deletions compose_image_picker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ signing {

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'

implementation platform("dev.chrisbanes.compose:compose-bom:2024.02.00-alpha01")
implementation platform("dev.chrisbanes.compose:compose-bom:2024.02.00-alpha02")
implementation 'androidx.compose.material3:material3'
implementation "androidx.compose.ui:ui"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,11 @@ fun AssetImageItem(
)

if (onDelete != null) {
Column(
modifier = Modifier.align(Alignment.TopEnd)
) {
Column(modifier = Modifier.align(Alignment.TopEnd)) {
IconButton(
modifier = Modifier
.padding(top = 4.dp, end = 4.dp)
.size(24.dp),
.size(16.dp),
onClick = onDelete,
) {
Icon(
Expand All @@ -102,9 +100,7 @@ fun AssetImageItem(
}

if (resourceType == AssetResourceType.VIDEO) {
Column(
modifier = Modifier.align(Alignment.BottomEnd),
) {
Column(modifier = Modifier.align(Alignment.BottomEnd)) {
Text(
modifier = Modifier.padding(bottom = 8.dp, end = 8.dp),
text = durationString ?: "00:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,3 @@ internal fun AssetSelectorScreen(
}
}
}

@Composable
@OptIn(ExperimentalMaterial3Api::class)
private fun DirectoryTopAppBar(directory: String, navigateUp: () -> Unit) {
CenterAlignedTopAppBar(
modifier = Modifier.statusBarsPadding(),
navigationIcon = {
IconButton(onClick = navigateUp) {
Icon(Icons.Filled.Close, contentDescription = "")
}
},
title = {
Row(modifier = Modifier.clickable(onClick = navigateUp)) {
Text(directory, fontSize = 18.sp)
Icon(Icons.Default.KeyboardArrowUp, contentDescription = "")
}
}
)
}

0 comments on commit daa0bac

Please sign in to comment.