Commit 8bbb746d authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update RoomListFragment.kt

parent 1ebff5c5
...@@ -89,14 +89,14 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -89,14 +89,14 @@ class RoomListFragment : Fragment(), RoomListContract.View {
token, token,
userId) userId)
} }
R.id.action_file_list -> { // R.id.action_file_list -> {
activity.title = getString(R.string.fragment_room_list_file_list_title) // activity.title = getString(R.string.fragment_room_list_file_list_title)
presenter.requestFileList(roomId, // presenter.requestFileList(roomId,
roomType, // roomType,
hostname, // hostname,
token, // token,
userId) // userId)
} // }
R.id.action_member_list -> { R.id.action_member_list -> {
activity.title = getString(R.string.fragment_room_list_member_list_title) activity.title = getString(R.string.fragment_room_list_member_list_title)
presenter.requestMemberList(roomId, presenter.requestMemberList(roomId,
...@@ -138,11 +138,12 @@ class RoomListFragment : Fragment(), RoomListContract.View { ...@@ -138,11 +138,12 @@ class RoomListFragment : Fragment(), RoomListContract.View {
} }
} }
override fun showMemberList(dataSet: ArrayList<User>) { override fun showMemberList(dataSet: ArrayList<User>, total: String) {
if (dataSet.isEmpty()) { if (dataSet.isEmpty()) {
showMessage(getString(R.string.fragment_room_list_no_member_list_to_show)) showMessage(getString(R.string.fragment_room_list_no_member_list_to_show))
} else { } else {
waitingView.visibility = View.GONE waitingView.visibility = View.GONE
activity.title = getString(R.string.fragment_room_list_member_list_title) + " (" + total + ")"
recyclerView.adapter = RoomMemberListAdapter(dataSet, hostname, context) recyclerView.adapter = RoomMemberListAdapter(dataSet, hostname, context)
recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false) recyclerView.layoutManager = LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false)
} }
......
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