From 4a9236e7c2bcccb681be9ad01f59493fbc0ff35c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 18 Jan 2025 22:11:03 +0000 Subject: [PATCH] fix(deps): update dependency androidx.compose:compose-bom-alpha to v2025 (#759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [androidx.compose:compose-bom-alpha](https://developer.android.com/jetpack) | `2024.12.01` -> `2025.01.00` | [![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.compose:compose-bom-alpha/2025.01.00?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.compose:compose-bom-alpha/2025.01.00?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.compose:compose-bom-alpha/2024.12.01/2025.01.00?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.compose:compose-bom-alpha/2024.12.01/2025.01.00?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/msfjarvis/compose-lobsters). --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Harsh Shandilya --- .../msfjarvis/claw/common/ui/NetworkError.kt | 18 +++++++++++++----- gradle/libs.versions.toml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/NetworkError.kt b/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/NetworkError.kt index 85c748e0..b12848e1 100644 --- a/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/NetworkError.kt +++ b/common/src/main/kotlin/dev/msfjarvis/claw/common/ui/NetworkError.kt @@ -1,11 +1,12 @@ /* - * Copyright © 2022-2024 Harsh Shandilya. + * Copyright © 2022-2025 Harsh Shandilya. * Use of this source code is governed by an MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ package dev.msfjarvis.claw.common.ui +import android.content.ClipData import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column @@ -18,15 +19,17 @@ import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalClipboardManager -import androidx.compose.ui.text.AnnotatedString +import androidx.compose.ui.platform.ClipEntry +import androidx.compose.ui.platform.LocalClipboard import androidx.compose.ui.unit.dp import dev.msfjarvis.claw.common.theme.LobstersTheme import dev.msfjarvis.claw.common.ui.preview.ThemePreviews import io.github.aakira.napier.Napier +import kotlinx.coroutines.launch @Composable fun NetworkError(label: String, error: Throwable, modifier: Modifier = Modifier) { @@ -46,7 +49,8 @@ fun NetworkError(label: String, error: Throwable, modifier: Modifier = Modifier) } } if (showDialog) { - val clipboard = LocalClipboardManager.current + val coroutineScope = rememberCoroutineScope() + val clipboard = LocalClipboard.current AlertDialog( onDismissRequest = { showDialog = false }, confirmButton = { @@ -54,7 +58,11 @@ fun NetworkError(label: String, error: Throwable, modifier: Modifier = Modifier) text = "Copy stacktrace", modifier = Modifier.clickable { - clipboard.setText(AnnotatedString(error.stackTraceToString())) + coroutineScope.launch { + clipboard.setClipEntry( + ClipEntry(ClipData.newPlainText("Stacktrace", error.stackTraceToString())) + ) + } showDialog = false }, ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 73e78f6b..41f73c07 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,7 +33,7 @@ androidx-activity-compose = "androidx.activity:activity-compose:1.10.0" androidx-benchmark-macro-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "benchmark" } androidx-browser = "androidx.browser:browser:1.8.0" androidx-compose-animation = { module = "androidx.compose.animation:animation" } -androidx-compose-bom = "androidx.compose:compose-bom-alpha:2024.12.01" +androidx-compose-bom = "androidx.compose:compose-bom-alpha:2025.01.00" androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" } androidx-compose-glance = { module = "androidx.glance:glance-appwidget", version.ref = "glance" } androidx-compose-glance-m3 = { module = "androidx.glance:glance-material3", version.ref = "glance" }