Commit 4b68973c authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Get formatted time from the DateTimeHelper

parent 250d34cc
package chat.rocket.android.app.chatroom
import android.content.Context
import DateTimeHelper
import android.support.v7.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
......@@ -10,7 +10,7 @@ import chat.rocket.android.R
import com.facebook.drawee.view.SimpleDraweeView
import kotlinx.android.synthetic.main.item_message.view.*
class MessageListAdapter(private var dataSet: MutableList<Message>, private val context: Context) : RecyclerView.Adapter<MessageListAdapter.ViewHolder>() {
class MessageListAdapter(private var dataSet: MutableList<Message>) : RecyclerView.Adapter<MessageListAdapter.ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_message, parent, false)
......@@ -22,7 +22,7 @@ class MessageListAdapter(private var dataSet: MutableList<Message>, private val
holder.userAvatar.setImageURI(message.user.avatarUri)
holder.userName.text = message.user.name
holder.time.text = message.time.toString()
holder.time.text = DateTimeHelper.getTime(message.localDatetime)
holder.content.text = message.content
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment