From 61ef7e851cf9e38cc53d6229e52b8ddcdc6c484d Mon Sep 17 00:00:00 2001 From: Ahmed El-Helw Date: Sun, 1 Dec 2024 18:53:10 +0400 Subject: [PATCH] Don't trim search query The search query wasn't being trimmed before, and it seems better since it saves us from results in the middle of a word if a space is pressed. --- .../java/com/quran/labs/androidquran/data/QuranDataProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/quran/labs/androidquran/data/QuranDataProvider.kt b/app/src/main/java/com/quran/labs/androidquran/data/QuranDataProvider.kt index 81220b9b1b..a71e3446e9 100644 --- a/app/src/main/java/com/quran/labs/androidquran/data/QuranDataProvider.kt +++ b/app/src/main/java/com/quran/labs/androidquran/data/QuranDataProvider.kt @@ -200,7 +200,7 @@ class QuranDataProvider : ContentProvider() { private fun search(query: String, databaseName: String, wantSnippets: Boolean): Cursor? { val handler = getDatabaseHandler(context!!, databaseName, quranFileUtils) - return handler.search(query.trim(), wantSnippets, QURAN_ARABIC_DATABASE == databaseName) + return handler.search(query, wantSnippets, QURAN_ARABIC_DATABASE == databaseName) } override fun getType(uri: Uri): String? {