Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #28266 - Merge BrowserTrayInteractor into TabsTrayInteractor #28584

Merged
merged 2 commits into from
Jan 24, 2023
Merged

For #28266 - Merge BrowserTrayInteractor into TabsTrayInteractor #28584

merged 2 commits into from
Jan 24, 2023

Conversation

MozillaNoah
Copy link
Contributor

@MozillaNoah MozillaNoah commented Jan 18, 2023

PR 6 of 10 for:

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

QA

  • QA Needed

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #28266

@MozillaNoah MozillaNoah requested review from a team as code owners January 18, 2023 23:01
@MozillaNoah MozillaNoah added the needs:review PRs that need to be reviewed label Jan 23, 2023

/**
* Default tabs tray dialog implementation for overriding the default on back pressed.
*/
class TabsTrayDialog(
context: Context,
theme: Int,
private val interactor: () -> BrowserTrayInteractor,
private val interactor: () -> TabsTrayInteractor,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious why couldn't we pass the TabsTrayInteractor directly here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have to double check, but this smelled like a hack to get around a race condition or dependency issue, so that a lambda could be called after onStart, or something, to provide the interactor, rather than have the interactor as a compile time dependency

Copy link
Contributor Author

@MozillaNoah MozillaNoah Jan 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TabsTrayDialog is created in TabsTrayFragment.onCreateDialog, while tabsTrayInteractor inside of TabsTrayFragment is a lateinit and instantiated inside onViewCreated

@gabrielluong gabrielluong added pr:approved PR that has been approved and removed needs:review PRs that need to be reviewed labels Jan 23, 2023
@MozillaNoah MozillaNoah added the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Jan 24, 2023
@mergify mergify bot merged commit 411bd55 into mozilla-mobile:main Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:approved PR that has been approved pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
2 participants