[meta] Remove (activity as HomeActivity) casts
Categories
(Firefox for Android :: Homepage, task)
Tracking
()
People
(Reporter: polly, Unassigned)
References
(Depends on 8 open bugs, Blocks 1 open bug)
Details
(Keywords: meta, Whiteboard: [fxdroid][group6] )
Fragments / composables currently often assume what parent container implementation they will be added to.
This stops us from being able to test Fragments in isolation.
(activity as HomeActivity) casts are currently used for access to:
- openToBrowserAndLoad
We can replace this with FenixBrowserUseCases.loadUrlOrSearch - browsingModeManager
We can refactor this out into a new use case to expose whether we are in private browsing mode or not.
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Bug 1973366 will already take care of replacing openToBrowserAndLoad as we look through every use case that involves open a URL to determine whether or not we need to open the URL in a new tab or not as part of Homepage as a New Tab. Please consider that task taken care of.
For BrowsingModeManger, we should consider refactoring this out into Components so it doesn't have to live in the HomeActivity. This will allow us to pass BrowsingModeManager into other application components more easily as well.
Comment 2•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox for Android::Homepage' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•11 months ago
|
||
Converting this to a meta bug because there will be many individual pieces where we want to remove this casting to HomeActivity or passing HomeActivity as parameter in order to access certain properties that can be retrieved elsewhere.
Updated•11 months ago
|
Updated•4 months ago
|
Description
•