Fix emoji sorting (#1633)
This commit is contained in:
parent
32fd7b18ce
commit
a6c9aee2e8
|
@ -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…
Reference in New Issue