Commit c1110705 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update RoomDialogFragment.kt

parent 7ebf655c
...@@ -12,6 +12,8 @@ import android.widget.TextView ...@@ -12,6 +12,8 @@ import android.widget.TextView
import chat.rocket.android.R import chat.rocket.android.R
import chat.rocket.android.layouthelper.chatroom.dialog.RoomFileListAdapter import chat.rocket.android.layouthelper.chatroom.dialog.RoomFileListAdapter
import chat.rocket.android.layouthelper.chatroom.dialog.RoomMemberListAdapter import chat.rocket.android.layouthelper.chatroom.dialog.RoomMemberListAdapter
import chat.rocket.android.layouthelper.chatroom.dialog.RoomPinnedMessagesAdapter
import chat.rocket.core.models.Message
/** /**
* Displays a dialog containing pinned messages, favorite messages, file list or member list of a room. * Displays a dialog containing pinned messages, favorite messages, file list or member list of a room.
...@@ -84,8 +86,14 @@ class RoomDialogFragment : DialogFragment(), RoomDialogContract.View { ...@@ -84,8 +86,14 @@ class RoomDialogFragment : DialogFragment(), RoomDialogContract.View {
actionId) actionId)
} }
override fun showPinnedMessages() { override fun showPinnedMessages(dataSet: ArrayList<Message>) {
// TODO("not implemented") if (dataSet.isEmpty()) {
// TODO("move to strings.xml")
showMessage("None pinned message to show")
} else {
recyclerView.adapter = RoomPinnedMessagesAdapter(dataSet, hostname)
recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, true)
}
} }
override fun showFavoriteMessages() { override fun showFavoriteMessages() {
......
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