cleaned code

This commit is contained in:
kosharskiy 2021-01-14 23:09:28 +02:00
parent 53e4a12056
commit d8e2989b76
1 changed files with 0 additions and 9 deletions

View File

@ -34,14 +34,7 @@ class ServerListAdapter(private val mServers: MutableList<Server>, private val o
} }
override fun onBindViewHolder(holder: ServerViewHolder, position: Int) { override fun onBindViewHolder(holder: ServerViewHolder, position: Int) {
holder.bind(mServers[position]) holder.bind(mServers[position])
//
// holder.itemView.setOnLongClickListener(v -> {
// Log.v("ServerListAdapter", "setOnLongClickListener " + position);
// return true;
// });
} }
fun setServers(servers: List<Server>) { fun setServers(servers: List<Server>) {
@ -51,8 +44,6 @@ class ServerListAdapter(private val mServers: MutableList<Server>, private val o
notifyDataSetChanged() notifyDataSetChanged()
} }
// getItemCount() is called many times, and when it is first called,
// mServers has not been updated (means initially, it's null, and we can't return null).
override fun getItemCount(): Int { override fun getItemCount(): Int {
return mServers.size return mServers.size
} }