Fixed crashes in ChatFragment due to wrong date class.
This commit is contained in:
parent
acbcd68384
commit
343c5fca07
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue