This commit is contained in:
team3
2026-10-09 22:13:54 +02:00
parent 59f39729fc
commit 1923567c62
5 changed files with 148 additions and 69 deletions

View File

@@ -81,7 +81,7 @@ fun NotesScreen(store: Store, modifier: Modifier = Modifier) {
val opened = open?.let { store.note(it) }
if (opened != null) {
NoteView(store, opened.id, onClose = { open = null })
NoteView(store, opened.id, modifier, onClose = { open = null })
return
}
@@ -180,7 +180,7 @@ private fun TreeRow(row: Row, onClick: () -> Unit, onLongClick: () -> Unit) {
// Eine Notiz: formatiert anzeigen, Tipp in den Text bearbeitet. Gespeichert wird alle 5 Sekunden und beim Verlassen.
@Composable
fun NoteView(store: Store, id: String, onClose: () -> Unit) {
fun NoteView(store: Store, id: String, modifier: Modifier = Modifier, onClose: () -> Unit) {
store.version.intValue
val note = store.note(id)
var editing by rememberSaveable { mutableStateOf(false) }
@@ -211,7 +211,7 @@ fun NoteView(store: Store, id: String, onClose: () -> Unit) {
}
}
Column(Modifier.fillMaxSize()) {
Column(modifier.fillMaxSize()) {
Row(Modifier.fillMaxWidth().padding(4.dp), verticalAlignment = Alignment.CenterVertically) {
IconButton(onClick = { if (editing) stopEdit() else onClose() }) { Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Zurück") }
Text(note?.name ?: "", style = MaterialTheme.typography.titleLarge, modifier = Modifier.weight(1f))