From 5216112a98a0eb6d317f1cca8cbc2b0ea07db28a Mon Sep 17 00:00:00 2001 From: Niklas Baudy Date: Sun, 10 Dec 2023 11:11:45 -0300 Subject: [PATCH] Behavior change: SearchEmojiManager sorts by found index and then by shortcode. --- .../kotlin/com/vanniktech/emoji/search/SearchEmojiManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/emoji/src/commonMain/kotlin/com/vanniktech/emoji/search/SearchEmojiManager.kt b/emoji/src/commonMain/kotlin/com/vanniktech/emoji/search/SearchEmojiManager.kt index a2d0f47937..2250a16674 100644 --- a/emoji/src/commonMain/kotlin/com/vanniktech/emoji/search/SearchEmojiManager.kt +++ b/emoji/src/commonMain/kotlin/com/vanniktech/emoji/search/SearchEmojiManager.kt @@ -39,6 +39,7 @@ class SearchEmojiManager : SearchEmoji { } }.firstOrNull() } + .sortedWith(compareBy({ it.range.first }, { it.shortcode })) else -> emptyList() } }