From 6c09e7d7862d111253fee615e29b5aab9d48a9f8 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Mon, 28 Sep 2026 06:56:21 +0000 Subject: [PATCH] put the name and the freed space on their own lines in the delete prompt --- .../com/subtracks/ui/components/DeleteDownloadsDialog.kt | 3 ++- .../com/subtracks/ui/components/DeleteDownloadsDialogTest.kt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/components/DeleteDownloadsDialog.kt b/app/src/main/kotlin/com/subtracks/ui/components/DeleteDownloadsDialog.kt index 2a0a962c..7cd1641d 100644 --- a/app/src/main/kotlin/com/subtracks/ui/components/DeleteDownloadsDialog.kt +++ b/app/src/main/kotlin/com/subtracks/ui/components/DeleteDownloadsDialog.kt @@ -23,10 +23,11 @@ fun DeleteDownloadsDialog( onConfirm: () -> Unit, onDismiss: () -> Unit, ) { + val freed = formatBytes(LocalContext.current, bytes) AlertDialog( onDismissRequest = onDismiss, title = { Text("Delete downloads") }, - text = { Text("Delete the downloaded songs of \"$name\"? This frees ${formatBytes(LocalContext.current, bytes)}.") }, + text = { Text("$name\nDeleting will free $freed") }, confirmButton = { TextButton( onClick = { diff --git a/app/src/test/kotlin/com/subtracks/ui/components/DeleteDownloadsDialogTest.kt b/app/src/test/kotlin/com/subtracks/ui/components/DeleteDownloadsDialogTest.kt index ad0cc463..abd3edda 100644 --- a/app/src/test/kotlin/com/subtracks/ui/components/DeleteDownloadsDialogTest.kt +++ b/app/src/test/kotlin/com/subtracks/ui/components/DeleteDownloadsDialogTest.kt @@ -24,6 +24,7 @@ class DeleteDownloadsDialogTest { render(bytes = 1_500_000) composeRule.onNodeWithText("Kid A", substring = true).assertIsDisplayed() + composeRule.onNodeWithText("Deleting will free", substring = true).assertIsDisplayed() composeRule.onNodeWithText("MB", substring = true).assertIsDisplayed() }