diff --git a/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt b/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt index 8525d2b44..3ab8c3b32 100644 --- a/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt +++ b/app/src/main/java/org/kiwix/kiwixmobile/nav/destination/reader/KiwixReaderFragment.kt @@ -291,7 +291,7 @@ class KiwixReaderFragment : CoreReaderFragment() { intent: Intent, activity: AppCompatActivity ): Super { - super.onNewIntent(activity.intent, activity) + super.onNewIntent(intent, activity) intent.data?.let { when (it.scheme) { "file" -> openZimFile(it.toFile()) 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 4895e14e2..924720e35 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 @@ -1753,21 +1753,26 @@ abstract class CoreReaderFragment : goToSearchWithText(intent) // see https://github.com/kiwix/kiwix-android/issues/2607 intent.action = null + // if used once then clear it to avoid affecting any other functionality of the application + requireActivity().intent.action = null } CoreSearchWidget.TEXT_CLICKED -> { goToSearch(false) intent.action = null + requireActivity().intent.action = null } CoreSearchWidget.STAR_CLICKED -> { goToBookmarks() intent.action = null + requireActivity().intent.action = null } CoreSearchWidget.MIC_CLICKED -> { goToSearch(true) intent.action = null + requireActivity().intent.action = null } Intent.ACTION_VIEW -> if (intent.type == null ||