From 5b617b03f694a40db9082c0bd3b73dea6aa4df7e Mon Sep 17 00:00:00 2001 From: shaiguelman Date: Sun, 17 Jul 2022 19:57:25 -0500 Subject: [PATCH] Optimize containsFilterString --- AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.kt b/AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.kt index 491efe8e8cb2..8631f0f18fc8 100644 --- a/AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.kt +++ b/AnkiDroid/src/main/java/com/ichi2/anki/widgets/DeckAdapter.kt @@ -381,7 +381,7 @@ class DeckAdapter(private val layoutInflater: LayoutInflater, context: Context) private fun containsFilterString(filterPattern: String, root: AbstractDeckTreeNode): Boolean { val deckName = root.fullDeckName - return deckName.lowercase(Locale.getDefault()).contains(filterPattern) || deckName.lowercase(Locale.ROOT).contains(filterPattern) + return deckName.contains(filterPattern, ignoreCase = true) } }