minor code cleanup

This commit is contained in:
Tibor Kaputa 2022-07-31 16:58:12 +02:00 committed by GitHub
parent 0035e6440c
commit cd851feffc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,10 +9,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.simplemobiletools.keyboard.R
import kotlinx.android.synthetic.main.item_emoji.view.*
class EmojisAdapter(
val context: Context, var items: List<String>, val itemClick: (emoji: String) -> Unit
) : RecyclerView.Adapter<EmojisAdapter.ViewHolder>() {
class EmojisAdapter(val context: Context, var items: List<String>, val itemClick: (emoji: String) -> Unit) : RecyclerView.Adapter<EmojisAdapter.ViewHolder>() {
private val layoutInflater = LayoutInflater.from(context)
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): EmojisAdapter.ViewHolder {
@ -28,9 +25,7 @@ class EmojisAdapter(
}
}
override fun getItemCount(): Int {
return items.size
}
override fun getItemCount() = items.size
private fun setupEmoji(view: View, emoji: String) {
val processed = EmojiCompat.get().process(emoji)