From 19f0dcae5dc72109f62ed70a358221c7c4be3995 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Thu, 15 Oct 2026 14:42:39 +0200 Subject: [PATCH] Say Create instead of Save when the editor makes a new event (#141) (#402) 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 Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/402 --- .../jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt | 9 ++++++++- app/src/main/res/values/strings.xml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt index f72acb4..37e6cae 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/edit/EventEditScreen.kt @@ -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( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 95bdd57..a08d56a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -124,6 +124,7 @@ Discard changes Keep editing Save + Create Add title Managed by ā€œ%1$sā€ — the title, date and repeat are kept in sync from your contacts. Reminders, location and notes are yours to edit.