update
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user