Skip to content

fix: reset package name in intent on open link error - #1320

Open
NatsuCamellia wants to merge 1 commit into
ReadYouApp:mainfrom
NatsuCamellia:missing-browser
Open

fix: reset package name in intent on open link error#1320
NatsuCamellia wants to merge 1 commit into
ReadYouApp:mainfrom
NatsuCamellia:missing-browser

Conversation

@NatsuCamellia

Copy link
Copy Markdown
Contributor

Problem

If a user selects a specific browser for opening links and later uninstalls it, the app crashes every time they open a link. This is because the catch block reuses the same Intent, which still carries the uninstalled browser's package name.

Reproduction

  1. Set a specific browser for opening links.
  2. Uninstall that browser.
  3. Open any article linkr in the app.

Fix

Reset the package on the ACTION_VIEW intent before retrying to fallback to other browsers.

Note

The stale browser preference is not cleared, so every subsequent link still shows the "something went wrong" toast. Maybe we can also reset the preference.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant