mirror of
https://github.com/etesync/android
synced 2024-12-23 07:08:16 +00:00
Change log view: be more defensive about malformed dates for events.
This commit is contained in:
parent
37c40ddbce
commit
5cd8ea82ff
@ -264,7 +264,13 @@ class JournalItemActivity : BaseActivity(), Refreshable {
|
|||||||
|
|
||||||
setTextViewText(view, R.id.title, event.summary)
|
setTextViewText(view, R.id.title, event.summary)
|
||||||
|
|
||||||
setTextViewText(view, R.id.when_datetime, getDisplayedDatetime(event.dtStart?.date?.time!!, event.dtEnd?.date!!.time, event.isAllDay(), context))
|
val dtStart = event.dtStart?.date?.time
|
||||||
|
val dtEnd = event.dtEnd?.date?.time
|
||||||
|
if ((dtStart == null) || (dtEnd == null)) {
|
||||||
|
setTextViewText(view, R.id.when_datetime, getString(R.string.loading_error_title))
|
||||||
|
} else {
|
||||||
|
setTextViewText(view, R.id.when_datetime, getDisplayedDatetime(dtStart, dtEnd, event.isAllDay(), context))
|
||||||
|
}
|
||||||
|
|
||||||
setTextViewText(view, R.id.where, event.location)
|
setTextViewText(view, R.id.where, event.location)
|
||||||
|
|
||||||
|
@ -251,7 +251,13 @@ class PrettyFragment(private val mainFragment: CollectionItemFragment, private v
|
|||||||
|
|
||||||
setTextViewText(view, R.id.title, event.summary)
|
setTextViewText(view, R.id.title, event.summary)
|
||||||
|
|
||||||
setTextViewText(view, R.id.when_datetime, getDisplayedDatetime(event.dtStart?.date?.time!!, event.dtEnd?.date!!.time, event.isAllDay(), context))
|
val dtStart = event.dtStart?.date?.time
|
||||||
|
val dtEnd = event.dtEnd?.date?.time
|
||||||
|
if ((dtStart == null) || (dtEnd == null)) {
|
||||||
|
setTextViewText(view, R.id.when_datetime, getString(R.string.loading_error_title))
|
||||||
|
} else {
|
||||||
|
setTextViewText(view, R.id.when_datetime, getDisplayedDatetime(dtStart, dtEnd, event.isAllDay(), context))
|
||||||
|
}
|
||||||
|
|
||||||
setTextViewText(view, R.id.where, event.location)
|
setTextViewText(view, R.id.where, event.location)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user