Skip to content

Commit

Permalink
✨ Add "now" button for time overwriting (#486)
Browse files Browse the repository at this point in the history
closes #474
  • Loading branch information
jheubuch authored Feb 20, 2025
1 parent 04c17b4 commit 23c1389
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,19 @@ fun DateTimeSelection(
)
},
trailingIcon = {
if (dateTime != null) {
if (dateTime == null) {
TextButton(
onClick = {
val now = ZonedDateTime.now()
dateTime = now
dateSelected(now)
}
) {
Text(
text = stringResource(id = R.string.now)
)
}
} else {
IconButton(onClick = {
dateTime = null
dateSelected(null)
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,5 @@
<string name="notice">Hinweis</string>
<string name="trwl_api_error">Aktuell gibt es vermehrt Probleme bei Träwelling (traewelling.de), daher ist die Funktionalität eingeschränkt. Bitte prüfe die Träwelling-Webseite.</string>
<string name="no_map_for_check_in">Für diesen Check-In steht moment leider keine Kartenansicht zur Verfügung.</string>
<string name="now">Jetzt</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,5 @@
<string name="trwl_api_error">Currently there are ongoing service issues with Träwelling (traewelling.de). Please check the Träwelling website.</string>
<string name="traewelling_de" translatable="false">traewelling.de</string>
<string name="no_map_for_check_in">Currently there is no map view available for this check-in.</string>
<string name="now">Now</string>
</resources>

0 comments on commit 23c1389

Please sign in to comment.