Repository navigation
Conversation
"Open links in a browser" was asked by Home alone. HomeScreen kept a private open() that checked it, but every other screen's onOpenUrl was wired in VectorApp straight to the in-app viewer, so module pages in the store, the canary list, the troubleshooter and the framework update screen opened the viewer whichever way the switch was set. The setting is now asked in one place, openLink in VectorApp, which every screen is handed as its onOpenUrl; Home's copy is gone. With the store's links in play, the browser path now sees URLs from the module catalogue rather than only ones the app built itself, so the fallback to the viewer catches any exception from startActivity, not just ActivityNotFoundException: a file:// homepage would otherwise throw FileUriExposedException and take the manager down. The row's subtitle also read "Off: GitHub pages open inside Vector." with the switch on. It now has an On line, added to every locale alongside the Off one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Open links in a browser" was asked by Home alone.
HomeScreenkept a privateopen()that checked it, but every other screen'sonOpenUrlwas wired inVectorAppstraight tonavigator.go(Web(url)), so module pages in the store, the canary list, the troubleshooter and the framework update screen opened the in-app viewer whichever way the switch was set. The setting is now asked in one place,openLinkinVectorApp, which every screen is handed as itsonOpenUrl; Home's copy and theHomeViewModelflow that fed it are gone.With the store's links in play, the browser path now sees URLs from the module catalogue (
homepageUrl,sourceUrl,url) rather than only ones the app built itself, so the fallback to the viewer catches any exception fromstartActivity, not justActivityNotFoundException: afile://homepage would otherwise throwFileUriExposedExceptionand take the manager down.WebScreenalready usesrunCatchingfor its own hand-off.The row's subtitle also read "Off: GitHub pages open inside Vector." with the switch on. It now has an On line,
settings_open_externally_summary_on, added to all 18 locales next to the Off one socheck_translations.pystays clean. Those translations were written to mirror each locale's existing Off line and its own word for "browser"; corrections through Crowdin are welcome.Tested on a Pixel Fold (Android 16) with a locally built
zipReleaseflashed through Magisk: with the switch on, Home's commit links and a store module's repository button open in the default browser; with it off, both open in the in-app viewer; the subtitle follows the switch.