Fixed crashes in ChatFragment due to wrong date class.

This commit is contained in:
Felix Ableitner 2016-07-17 17:34:37 +02:00
parent acbcd68384
commit 343c5fca07
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ object DatesAdapter {
override def getSectionTitleForItem(item: Message): String = {
DateFormat
.getDateInstance(DateFormat.MEDIUM)
.format(item.header.time.get)
.format(item.header.time.get.toDate)
}
}

View file

@ -46,7 +46,7 @@ class MessagesAdapter(context: Context, items: Seq[Message], remoteAddress: Addr
text.setText(msg.body.asInstanceOf[Text].text)
val formattedDate = DateFormat
.getTimeInstance(DateFormat.SHORT)
.format(msg.header.time.get)
.format(msg.header.time.get.toDate)
time.setText(formattedDate)
val paddingLarge = (MessagePaddingLarge * context.getResources.getDisplayMetrics.density).toInt