Fix emoji sorting (#1633)

main
kyori19 5 years ago committed by Konrad Pozniak
parent e60a9b19e9
commit cafd5a3a64
  1. 2
      app/src/main/java/com/keylesspalace/tusky/adapter/EmojiAdapter.kt

@ -22,12 +22,14 @@ import android.widget.ImageView
import com.bumptech.glide.Glide
import com.keylesspalace.tusky.R
import com.keylesspalace.tusky.entity.Emoji
import java.util.*
class EmojiAdapter(emojiList: List<Emoji>, private val onEmojiSelectedListener: OnEmojiSelectedListener) : RecyclerView.Adapter<EmojiAdapter.EmojiHolder>() {
private val emojiList : List<Emoji>
init {
this.emojiList = emojiList.filter { emoji -> emoji.visibleInPicker == null || emoji.visibleInPicker }
.sortedBy { it.shortcode.toLowerCase(Locale.ROOT) }
}
override fun getItemCount(): Int {

Loading…
Cancel
Save