diff --git a/app/src/main/java/com/geeksville/mesh/model/UIState.kt b/app/src/main/java/com/geeksville/mesh/model/UIState.kt index a41b1cf9..7f9c6e13 100644 --- a/app/src/main/java/com/geeksville/mesh/model/UIState.kt +++ b/app/src/main/java/com/geeksville/mesh/model/UIState.kt @@ -143,8 +143,8 @@ data class Contact( ) // return time if within 24 hours, otherwise date -private fun getShortDate(time: Long): String { - val date = Date(time) +private fun getShortDate(time: Long): String? { + val date = if (time != 0L) Date(time) else return null val isWithin24Hours = System.currentTimeMillis() - date.time <= TimeUnit.DAYS.toMillis(1) return if (isWithin24Hours) {