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:
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(
|
||||
|
||||
@@ -124,6 +124,7 @@
|
||||
<string name="event_edit_unsaved_discard">Discard changes</string>
|
||||
<string name="event_edit_unsaved_keep">Keep editing</string>
|
||||
<string name="event_edit_save">Save</string>
|
||||
<string name="event_edit_create">Create</string>
|
||||
<string name="event_edit_title_hint">Add title</string>
|
||||
<!-- %1$s is the managing calendar's name, e.g. "Birthdays". -->
|
||||
<string name="event_edit_managed_hint">Managed by “%1$s” — the title, date and repeat are kept in sync from your contacts. Reminders, location and notes are yours to edit.</string>
|
||||
|
||||
Reference in new issue
Block a user