mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
put the name and the freed space on their own lines in the delete prompt
This commit is contained in:
@@ -23,10 +23,11 @@ fun DeleteDownloadsDialog(
|
|||||||
onConfirm: () -> Unit,
|
onConfirm: () -> Unit,
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
) {
|
) {
|
||||||
|
val freed = formatBytes(LocalContext.current, bytes)
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
onDismissRequest = onDismiss,
|
onDismissRequest = onDismiss,
|
||||||
title = { Text("Delete downloads") },
|
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 = {
|
confirmButton = {
|
||||||
TextButton(
|
TextButton(
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ class DeleteDownloadsDialogTest {
|
|||||||
render(bytes = 1_500_000)
|
render(bytes = 1_500_000)
|
||||||
|
|
||||||
composeRule.onNodeWithText("Kid A", substring = true).assertIsDisplayed()
|
composeRule.onNodeWithText("Kid A", substring = true).assertIsDisplayed()
|
||||||
|
composeRule.onNodeWithText("Deleting will free", substring = true).assertIsDisplayed()
|
||||||
composeRule.onNodeWithText("MB", substring = true).assertIsDisplayed()
|
composeRule.onNodeWithText("MB", substring = true).assertIsDisplayed()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user