Merge pull request #2936 from kiwix/Issue#625

Search widget issue fix
This commit is contained in:
Kelson 2022-08-10 14:17:23 +02:00 committed by GitHub
commit 0e644e813a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -157,6 +157,7 @@ abstract class CoreMainActivity : BaseActivity(), WebViewProvider {
override fun onNewIntent(intent: Intent) { override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent) super.onNewIntent(intent)
this.intent.action = intent.action
activeFragments().filterIsInstance<FragmentActivityExtensions>().forEach { activeFragments().filterIsInstance<FragmentActivityExtensions>().forEach {
it.onNewIntent(intent, this) it.onNewIntent(intent, this)
} }

View File

@ -1240,12 +1240,15 @@ public abstract class CoreReaderFragment extends BaseFragment
} }
case CoreSearchWidget.TEXT_CLICKED: case CoreSearchWidget.TEXT_CLICKED:
goToSearch(false); goToSearch(false);
intent.setAction(null);
break; break;
case CoreSearchWidget.STAR_CLICKED: case CoreSearchWidget.STAR_CLICKED:
goToBookmarks(); goToBookmarks();
intent.setAction(null);
break; break;
case CoreSearchWidget.MIC_CLICKED: case CoreSearchWidget.MIC_CLICKED:
goToSearch(true); goToSearch(true);
intent.setAction(null);
break; break;
case Intent.ACTION_VIEW: case Intent.ACTION_VIEW:
if (intent.getType() == null || !intent.getType().equals("application/octet-stream")) { if (intent.getType() == null || !intent.getType().equals("application/octet-stream")) {