From 0b778e179dc33b59272acd43189f81cdca4a47ac Mon Sep 17 00:00:00 2001 From: avi Date: Tue, 15 Sep 2026 12:11:33 -0500 Subject: [PATCH] Desktop: drop per-row Delete; selection bar's Delete is the one path Every row had a Delete button that duplicated the bulk bar (check a box -> Delete N). Removed it plus its now-dead single-file confirm dialog; deletion is checkbox + bar from now on. Detail screen keeps its own delete. --- .../main/kotlin/com/shonar/desktop/Screens.kt | 41 ++----------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/app/src/main/kotlin/com/shonar/desktop/Screens.kt b/app/src/main/kotlin/com/shonar/desktop/Screens.kt index 4b3e402..1e2cb99 100644 --- a/app/src/main/kotlin/com/shonar/desktop/Screens.kt +++ b/app/src/main/kotlin/com/shonar/desktop/Screens.kt @@ -193,7 +193,6 @@ fun LibraryScreen(state: DesktopState) { val hits by state.searchResults.collectAsState() val connected by state.connected.collectAsState() var renaming by remember { mutableStateOf(null) } - var deleting by remember { mutableStateOf(null) } var deletingMany by remember { mutableStateOf(false) } var deleteNotice by remember { mutableStateOf(null) } val deleteWarning by state.deleteWarning.collectAsState() @@ -428,21 +427,9 @@ fun LibraryScreen(state: DesktopState) { Text("Rename") } } - // No "Open" button: clicking the card opens the - // recording (the button was redundant). - if (e.status != FileStatus.RUNNING) { - TextButton( - { deleting = e.file }, - content = { - Icon(Icons.Filled.Delete, contentDescription = null, - modifier = Modifier.size(18.dp), - tint = MaterialTheme.colorScheme.error) - Spacer(Modifier.width(4.dp)) - Text("Delete", - color = MaterialTheme.colorScheme.error) - }, - ) - } + // No per-row Delete: select the checkbox and the + // bulk bar's Delete button does the same thing. + // No "Open" button either (clicking the card opens). } } } @@ -490,28 +477,6 @@ fun LibraryScreen(state: DesktopState) { style = MaterialTheme.typography.bodySmall) } - deleting?.let { target -> - AlertDialog( - onDismissRequest = { deleting = null }, - title = { Text("Delete recording?") }, - text = { - Text("\"${target.nameWithoutExtension}\" and its saved " + - "transcript will be removed from this folder. If it " + - "was transcribed, the engine's copy is deleted too. " + - "This can't be undone from the app.") - }, - confirmButton = { - TextButton({ - deleteNotice = state.deleteFile(target) - deleting = null - }) { Text("Delete", color = MaterialTheme.colorScheme.error) } - }, - dismissButton = { - TextButton({ deleting = null }) { Text("Cancel") } - }, - ) - } - if (deletingMany) { val victims = state.selectedFiles() val names = victims.take(8).joinToString("\n") {