From 8e9fab85d8ac49705f78851dfff763ca95ddfa5a Mon Sep 17 00:00:00 2001 From: Ahmed El-Helw Date: Sun, 1 Dec 2024 20:48:17 +0400 Subject: [PATCH] Fix missing Arabic search database --- .../java/com/quran/labs/androidquran/data/QuranDataProvider.kt | 3 +-- .../java/com/quran/labs/androidquran/util/QuranFileUtils.kt | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 a71e3446e9..c9e152e59e 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 @@ -78,8 +78,7 @@ class QuranDataProvider : ContentProvider() { return null } val queryIsArabic = QuranUtils.doesStringContainArabic(query) - val haveArabic = queryIsArabic && - quranFileUtils.hasTranslation(QURAN_ARABIC_DATABASE) + val haveArabic = queryIsArabic && quranFileUtils.hasArabicSearchDatabase() val translations = availableTranslations() if (translations.isEmpty() && queryIsArabic && !haveArabic) { return null diff --git a/app/src/main/java/com/quran/labs/androidquran/util/QuranFileUtils.kt b/app/src/main/java/com/quran/labs/androidquran/util/QuranFileUtils.kt index f3a4c0348d..d01a670755 100644 --- a/app/src/main/java/com/quran/labs/androidquran/util/QuranFileUtils.kt +++ b/app/src/main/java/com/quran/labs/androidquran/util/QuranFileUtils.kt @@ -544,7 +544,7 @@ class QuranFileUtils @Inject constructor( if (ayahInfoFile.exists()) { val translationsFile = File(base, QuranDataProvider.QURAN_ARABIC_DATABASE) - if (base.exists() || base.parentFile?.mkdirs() == true) { + if (base.exists() || base.mkdirs() == true) { try { copyFile(ayahInfoFile, translationsFile) return true