diff --git a/app/src/main/java/com/p_vacho/neat_calendar/activities/EventDetailsActivity.kt b/app/src/main/java/com/p_vacho/neat_calendar/activities/EventDetailsActivity.kt
index 3e7a5b9..6585566 100644
--- a/app/src/main/java/com/p_vacho/neat_calendar/activities/EventDetailsActivity.kt
+++ b/app/src/main/java/com/p_vacho/neat_calendar/activities/EventDetailsActivity.kt
@@ -117,11 +117,18 @@ class EventDetailsActivity : AppCompatActivity() {
private fun setEventDetails() {
// Set basic event details
tvEventTitle.text = event.title
- tvEventStartTime.text = getString(R.string.event_start_time, formatDateTime(event.start_time.toLocalDateTime()))
- tvEventEndTime.text = getString(R.string.event_end_time, formatDateTime(event.end_time.toLocalDateTime()))
tvEventDescription.text = event.description
tvEventCreatedAt.text = getString(R.string.event_created_at, formatDateTime(event.created_at.toLocalDateTime()))
+ //
+ if (event.start_time == event.end_time) {
+ tvEventStartTime.text = getString(R.string.instant_event_time, formatDateTime(event.start_time.toLocalDateTime()))
+ tvEventEndTime.visibility = View.GONE
+ } else {
+ tvEventStartTime.text = getString(R.string.event_start_time, formatDateTime(event.start_time.toLocalDateTime()))
+ tvEventEndTime.text = getString(R.string.event_end_time, formatDateTime(event.end_time.toLocalDateTime()))
+ }
+
val userId = (application as MyApplication).tokenManager.userId
// Set categories or show the placeholder
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d5151df..95a4a94 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -100,4 +100,5 @@
Edit category
Please enter a category name
Failed to save category: %1$s
+ At: %1$s
\ No newline at end of file