From 6104afeaddb9a4b975a77d8f09ceba6c294893c1 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 23 Nov 2023 19:20:31 +0530 Subject: [PATCH] Fixed app_name not found in project --- .../java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt | 3 ++- .../java/org/kiwix/kiwixmobile/core/main/CoreSearchWidget.kt | 3 ++- .../core/search/viewmodel/effects/StartSpeechInput.kt | 3 ++- .../org/kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt index 30ad5d8945..8edd201849 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreReaderFragment.kt @@ -97,6 +97,7 @@ import org.json.JSONException import org.kiwix.kiwixmobile.core.BuildConfig import org.kiwix.kiwixmobile.core.NightModeConfig import org.kiwix.kiwixmobile.core.R +import com.tonyodev.fetch2.R.string import org.kiwix.kiwixmobile.core.StorageObserver import org.kiwix.kiwixmobile.core.base.BaseFragment import org.kiwix.kiwixmobile.core.base.FragmentActivityExtensions @@ -993,7 +994,7 @@ abstract class CoreReaderFragment : } private fun getValidTitle(zimFileTitle: String?): String = - if (isAdded && isInvalidTitle(zimFileTitle)) getString(R.string.app_name) + if (isAdded && isInvalidTitle(zimFileTitle)) getString(string.app_name) else zimFileTitle.toString() private fun isInvalidTitle(zimFileTitle: String?): Boolean = diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreSearchWidget.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreSearchWidget.kt index edf42b825d..84a0533a3a 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreSearchWidget.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/main/CoreSearchWidget.kt @@ -25,6 +25,7 @@ import android.content.Context import android.content.Intent import android.widget.RemoteViews import org.kiwix.kiwixmobile.core.R +import com.tonyodev.fetch2.R.string import kotlin.reflect.KClass abstract class CoreSearchWidget : AppWidgetProvider() { @@ -36,7 +37,7 @@ abstract class CoreSearchWidget : AppWidgetProvider() { appWidgetManager: AppWidgetManager, appWidgetIds: IntArray ) { - val appName = context.getString(R.string.app_name) + val appName = context.getString(string.app_name) appWidgetIds.forEach { appWidgetId -> val views = RemoteViews(context.packageName, R.layout.kiwix_search_widget) views.setTextViewText(R.id.search_widget_text, "Search $appName") diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/search/viewmodel/effects/StartSpeechInput.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/search/viewmodel/effects/StartSpeechInput.kt index a92f0f8ab1..b3174041c1 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/search/viewmodel/effects/StartSpeechInput.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/search/viewmodel/effects/StartSpeechInput.kt @@ -24,6 +24,7 @@ import android.speech.RecognizerIntent import androidx.appcompat.app.AppCompatActivity import kotlinx.coroutines.channels.Channel import org.kiwix.kiwixmobile.core.R +import com.tonyodev.fetch2.R.string import org.kiwix.kiwixmobile.core.base.SideEffect import org.kiwix.kiwixmobile.core.search.viewmodel.Action import org.kiwix.kiwixmobile.core.search.viewmodel.Action.StartSpeechInputFailed @@ -41,7 +42,7 @@ data class StartSpeechInput(private val actions: Channel) : SideEffect