chore(ui): migrate LocalClipboardManager to LocalClipboard (suspend clipboard API) #237

Closed
opened 2026-07-03 16:53:16 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-03 16:53:16 +00:00 (Migrated from github.com)

Clear the 'LocalClipboardManager' is deprecated. Use LocalClipboard instead warning (1 site), from the Gradle-warnings investigation.

Not a pure import swap — the replacement API is suspend-based. In app/src/main/kotlin/org/libremail/ui/reporting/ReportReviewScreen.kt: LocalClipboardManager.current (L60) becomes LocalClipboard.current (returns androidx.compose.ui.platform.Clipboard), and the synchronous clipboard.setText(AnnotatedString(...)) at L185 becomes suspend fun setClipEntry(ClipEntry?) — so the "Copy report" action moves into a coroutine (a rememberCoroutineScope() already exists at L61) and builds a ClipEntry.

Provided by the pinned Compose BOM. Low-to-moderate risk (async copy changes the runtime surface) → verify the "Copy report" action end-to-end. Backlogged; harmless as-is.

Clear the `'LocalClipboardManager' is deprecated. Use LocalClipboard instead` warning (1 site), from the Gradle-warnings investigation. **Not a pure import swap** — the replacement API is suspend-based. In `app/src/main/kotlin/org/libremail/ui/reporting/ReportReviewScreen.kt`: `LocalClipboardManager.current` (L60) becomes `LocalClipboard.current` (returns `androidx.compose.ui.platform.Clipboard`), and the synchronous `clipboard.setText(AnnotatedString(...))` at L185 becomes `suspend fun setClipEntry(ClipEntry?)` — so the "Copy report" action moves into a coroutine (a `rememberCoroutineScope()` already exists at L61) and builds a `ClipEntry`. Provided by the pinned Compose BOM. Low-to-moderate risk (async copy changes the runtime surface) → **verify the "Copy report" action end-to-end**. Backlogged; harmless as-is.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#237