mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Improve emoji search results.
This commit is contained in:
@@ -26,7 +26,7 @@ class EmojiSearchRepository(private val context: Context) {
|
||||
|
||||
fun submitQuery(query: String, limit: Int = EMOJI_SEARCH_LIMIT): Single<List<String>> {
|
||||
val result = if (query.length >= MINIMUM_INLINE_QUERY_THRESHOLD && NOT_PUNCTUATION.matches(query.substring(query.lastIndex))) {
|
||||
Single.fromCallable<List<String>> { emojiSearchDatabase.query(query, limit) }
|
||||
Single.fromCallable { emojiSearchDatabase.query(query, limit) }
|
||||
} else {
|
||||
Single.just(emptyList())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user