android: delete the Documents row menu and its settings dialog

Each row's ⋮ opened a menu with one item, "Settings", which opened a
read-only dialog of the title, type and created date — what the row itself
and the detail screen already show. (F4h)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Greg ShuflinandClaude Opus 5.5 committed 2026-09-29 03:12:54 -07:00
1 parent e3bbfefe42
commit 973c427c89
1 file changed
-47
@@ -30,7 +30,6 @@ import com.gregshuflin.synchronicity.ui.CenteredLoading
import com.gregshuflin.synchronicity.ui.ChangedElsewhereStrip
import com.gregshuflin.synchronicity.ui.IMPORT_ICON
import com.gregshuflin.synchronicity.ui.LabeledSwitch
import com.gregshuflin.synchronicity.ui.LabeledValue
import com.gregshuflin.synchronicity.ui.SharedCopy
import com.gregshuflin.synchronicity.ui.SubAppScreen
import com.gregshuflin.synchronicity.ui.SynSearchBar
@@ -423,8 +422,6 @@ fun DocumentsScreen(
}
// Document list
var settingsDocument by remember { mutableStateOf<DocumentDisplayModel?>(null) }
if (isLoading && documents.isEmpty()) {
CenteredLoading()
} else {
@@ -435,9 +432,6 @@ fun DocumentsScreen(
if (hasActiveFilters) "No documents match your search"
else "No documents found",
onDocumentClick = onDocumentClick?.let { navigate -> { doc -> navigate(doc.id) } },
trailingContent = { doc ->
DocumentOverflowMenu(onSettingsClick = { settingsDocument = doc })
},
onLoadMore = loadMore,
expandedIds = expandedIds,
matchQuery = searchQuery.trim().ifEmpty { null },
@@ -455,50 +449,9 @@ fun DocumentsScreen(
} else null,
)
}
settingsDocument?.let { doc ->
DocumentSettingsDialog(document = doc, onDismiss = { settingsDocument = null })
}
}
}
@Composable
private fun DocumentOverflowMenu(onSettingsClick: () -> Unit) {
var expanded by remember { mutableStateOf(false) }
Box {
IconButton(onClick = { expanded = true }) {
Icon(Icons.Default.MoreVert, contentDescription = "More options")
}
DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
DropdownMenuItem(
text = { Text("Settings") },
onClick = {
expanded = false
onSettingsClick()
},
leadingIcon = { Icon(Icons.Default.Settings, contentDescription = null) },
)
}
}
}
@Composable
private fun DocumentSettingsDialog(document: DocumentDisplayModel, onDismiss: () -> Unit) {
AlertDialog(
onDismissRequest = onDismiss,
title = { Text("Document Settings") },
text = {
Column(verticalArrangement = Arrangement.spacedBy(12.dp)) {
LabeledValue(label = "Title", value = document.name)
LabeledValue(label = "Type", value = document.type)
LabeledValue(label = "Created", value = document.date)
}
},
confirmButton = { TextButton(onClick = onDismiss) { Text(SharedCopy.actions.close) } },
)
}
/**
* The imports running right now, named and with their progress — one line each.
*