Skip to content

Commit

Permalink
Correct Misunderstanding
Browse files Browse the repository at this point in the history
Passing the whole ExtensionRepo data class through now, using the name
for display purposes and the baseUrl for copying the URL.
  • Loading branch information
MajorTanya committed Mar 23, 2024
1 parent 7a495f0 commit 4e35a06
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fun ExtensionReposContent(
item {
ExtensionRepoListItem(
modifier = Modifier.animateItemPlacement(),
repo = it.baseUrl,
repo = it,
onOpenWebsite = { onOpenWebsite(it) },
onDelete = { onClickDelete(it.baseUrl) },
)
Expand All @@ -58,7 +58,7 @@ fun ExtensionReposContent(

@Composable
private fun ExtensionRepoListItem(
repo: String,
repo: ExtensionRepo,
onOpenWebsite: () -> Unit,
onDelete: () -> Unit,
modifier: Modifier = Modifier,
Expand All @@ -80,7 +80,7 @@ private fun ExtensionRepoListItem(
) {
Icon(imageVector = Icons.AutoMirrored.Outlined.Label, contentDescription = null)
Text(
text = repo,
text = repo.name,
modifier = Modifier.padding(start = MaterialTheme.padding.medium),
style = MaterialTheme.typography.titleMedium,
)
Expand All @@ -99,7 +99,7 @@ private fun ExtensionRepoListItem(

IconButton(
onClick = {
val url = "$repo/index.min.json"
val url = "${repo.baseUrl}/index.min.json"
context.copyToClipboard(url, url)
},
) {
Expand Down

0 comments on commit 4e35a06

Please sign in to comment.