Say Create instead of Save when the editor makes a new event (#141) (#402)
Beta — Codeberg pre-release / detect (push) Successful in 7s
Beta — Codeberg pre-release / beta (push) Skipped

Feedback from the #141 beta: a duplicate opened the editor with the same title and a plain Save button, so it looked like editing the original.

The editor button now says Create for every new event (new, duplicate, shared text, .ics, long-press draft) and Save only when editing an existing event. The label is taken from how the editor was opened, so it doesn't flip while the form loads.

The other two feedback points (handle shape, start time under the finger) are left as they are, see the comment on #141.

Closes #141

Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de>
Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/402
This commit is contained in:
Jean-Luc Makiolaandmakiolaj committed 2026-10-15 14:42:39 +02:00
1 parent c3401ed61c
commit 19f0dcae5d
2 files changed
+9 -1

No files matched your search

@@ -365,6 +365,9 @@ fun EventEditScreen(
}
}
// From the inputs, not the loaded state, so the label never flips mid-load.
val opensForEdit = initialForm == null && editKey != null
Scaffold(
modifier = Modifier.predictiveBack(onBack = requestClose, visible = visible),
snackbarHost = { SnackbarHost(snackbarHostState) },
@@ -396,7 +399,11 @@ fun EventEditScreen(
enabled = state != null && state?.saveState != SaveUiState.Saving,
modifier = Modifier.padding(end = 12.dp),
) {
Text(stringResource(R.string.event_edit_save))
Text(
stringResource(
if (opensForEdit) R.string.event_edit_save else R.string.event_edit_create,
),
)
}
},
colors = TopAppBarDefaults.topAppBarColors(