mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.25k stars 2.94k forks source link

Homepage view controller should use parent coordinator for homepanelDelegate #17612

Open data-sync-user opened 11 months ago

data-sync-user commented 11 months ago

The HomepageViewController is currently dependent on the following delegates:

homepanelDelegate: homepanelDelegate,
libraryPanelDelegate: libraryPanelDelegate,
sendToDeviceDelegate: sendToDeviceDelegate,

Those delegates are in fact all BVC in disguise, which can now be avoided since all those delegates are doing can be handled by the different coordinators that exists. We can have three separate PRs for this task, handling one delegate at a time in each of them.

In this task, the homepanelDelegate can be handled for the homepage. The goal is that the homepage will use the browser coordinator for the needed actions, instead of relying on BVC. We can use a parent coordinator so the homepageViewController pass the responsibility to the BrowserCoordinator to call the BrowserCoordinator for the right methods.

┆Issue is synchronized with this Jira Task

github-actions[bot] commented 6 days ago

This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!